-
Very Odd UnZipping Issue
Hey All,
I'm having an issue in php. I have a zip file that is uploaded to the server. I need to unzip the file and then play with it's contents.
If I manually ssh onto the server via www-data (the same user account as apache runs in), I can type
# unzip -u base.zip -d /full/dest/path
And all of the zip files contents are decompressed. BUT if I have my php code run
exec('unzip -u base.zip -d /full/dest/path');
some of the files from the zip file are unzipped but others are outright missing from the destination directory. The code continues to process after the exec() statement and there are no errors in the apache log files.
ANY HELP would greatly be appreciated.
thanks!
-
Is there any pattern that you are noticing? Files of certain types, etc? Are the same files missing each time you run the exec?
-
Are the file permissions set to 777 for that directory for the script access itself? That could cause the issue if not.......also try: <? exec("unzip base.zip /full/dest/path"); ?>
-
I've resolved the issue, thanks for the helpful questions but the issue was related to post unzipping parsing, I just needed to breakdown the code :)