addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblinklocation-pinlockm-swarmSearchmailmessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

PHP calling unzip

From: Joe T.
Sent on: Wednesday, March 14, 2012 11:28 AM

Boss asked me to figure this out and now we're both stumped.  I wrote a little test script to see if we can use PHP to unzip a file:

$ more ziptest.php
echo("Start here");
exec("unzip ~/", $aOutput);

echo("end here");

It works great at the command line - it extracts the file and gives me stdout:

$ php -f ziptest.php
Start here[Archive:  /home/user/]end here

But it's not doing squat via Apache:

Start here[]end here

And no we're not using the zip module.  Our SAMP stack has to be built by hand from source code and I don't have the time right now to do that to add this functionality to PHP.  I've also verified that the directory the script lives in has rw perms for the Apache daemon user.

Can I assume I'm really close and it's some tiny detail I'm overlooking?

Thx in advance,

 - Joe

If you type "Google" into Google, you can break the Internet.  -- Jen Barber

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy