N
N
nllm2015-06-22 10:42:45
PHP
nllm, 2015-06-22 10:42:45

Why doesn't unzip work correctly when called from php with exec?

Delivered unzip with processing of Cyrillic names.
If I start unpacking the archive in the console, then files with Cyrillic names appear.

/usr/bin/unzip -O cp866 ./123.zip -d ./123

If the same thing happens from a php script, then the folders are created, but the files do not appear.
exec("/usr/bin/unzip -O cp866 ./123.zip -d ./123");

What could be the reason? How to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tplus, 2015-06-22
@tplus

Are you sure the current working folder for php is the same as the one it was when you did the manual unzip?
Try inside the php script to set the full path to the archive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question