patrickMast Posted October 5, 2008 Share Posted October 5, 2008 Hi there, I once wrote a PHP-script to run a Prolog query. I used exec() to call prolog. When i tried to find the bug I recognized some strange behavior: The call exec("uptime", $result, $return_var); is working as expected: $result is the uptime string $return_var=0 But the call exec("ls", $result, $return_var); is NOT working: $result is an empty array $return_var=2 The script is hosted on the server of our university. Does anyone have a clue why some commands do work and others don't? Or does anybody know what the return value "2" does mean? Thank you for your help! Patrick Link to comment https://forums.phpfreaks.com/topic/127158-exec/ Share on other sites More sharing options...
DarkWater Posted October 5, 2008 Share Posted October 5, 2008 http://www.museum.state.il.us/ismdepts/library/linuxguides/abs-guide/exitcodes.html#EXITCODESREF It means "misuse of shell builtins", apparently. Link to comment https://forums.phpfreaks.com/topic/127158-exec/#findComment-657774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.