Jump to content

System() Return Values


RayTaylorII

Recommended Posts

From the php manual entry for system: Returns the last line of the command output on success, and FALSE on failure.

 

I did see that in the PHP manual, but the command does not complete, so I would expect a false, but the return code is 50. 50 isn't part of the command output?

 

This is the actual line of code being executed:

 

system("unzip -qq  -P password /FTPRTLORD/ORDERS/ROrders_01012012_000501.ZIP -d /FTPRTLORD/ORDERS/",$retValue);

 

$retValue comes back 50.

Edited by RayTaylorII
Link to comment
Share on other sites

Does the PHP/web user have permissions to run the command?

 

Actually, you are dead on!!!! I assumed (and you know what that does) that the user name I used to connect to the database was the same user who was used to run system commands...not so. Once I found the correct user being used, I updated permissions for that user and it works....

Thanks so much!!!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.