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? Link to comment https://forums.phpfreaks.com/topic/166388-what-does-php-exec-return-value-of-5-mean/ Share on other sites More sharing options...
trq Posted July 18, 2009 Share Posted July 18, 2009 Depends on what the command is. Link to comment https://forums.phpfreaks.com/topic/166388-what-does-php-exec-return-value-of-5-mean/#findComment-877431 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? Link to comment https://forums.phpfreaks.com/topic/166388-what-does-php-exec-return-value-of-5-mean/#findComment-877465 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. Link to comment https://forums.phpfreaks.com/topic/166388-what-does-php-exec-return-value-of-5-mean/#findComment-879049 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. Link to comment https://forums.phpfreaks.com/topic/166388-what-does-php-exec-return-value-of-5-mean/#findComment-879075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.