Jump to content

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

AFAIK, system() returns FALSE if system() fails to execute, not the command within it. The value is what is being returned from the command. Have you run the command from the CLI?

 

I run the command in the linux command line interace on the IBM i and it runs fine.

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!!!!

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.