ternto333 Posted July 17, 2009 Share Posted July 17, 2009 In the command exec($command, $return_array, $return_value), $return_array is empty and $return_value returns 5. I am unfamiliar with the return value of 5. I know if the command successfully executes, a return value of 0 is expected. I am running this command from the web and when I run the exact command from the command line, it works fine. Any thoughts? Quote Link to comment Share on other sites More sharing options...
trq Posted July 18, 2009 Share Posted July 18, 2009 Depends on what the command is. Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted July 18, 2009 Share Posted July 18, 2009 exec() and system() are php shell functions that just pass a call to the server's OS ... anything that exec() or system() returns is whatever the shell returned. The host language (in this case, PHP) is very much 'out of the loop' when it comes to shell commands. A return status of 5 from a shell of 'ping' could mean one thing on winblows and something totally different on Linux. Additionally, the return of INT(5) could mean one thing to 'ping' but something totally different to 'netstat' ... etc. What command are you shelling and to what OS? Quote Link to comment Share on other sites More sharing options...
ternto333 Posted July 20, 2009 Author Share Posted July 20, 2009 Thanks for the reply. I'm actually running a swish-e command, which should search my database for a given term. I'm running it on MacOSX Tiger. Quote Link to comment Share on other sites More sharing options...
trq Posted July 20, 2009 Share Posted July 20, 2009 Then I'd look in the swish man pages to see what a returned value of 5 means. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.