vnv Posted February 26, 2009 Share Posted February 26, 2009 Hi, I am running debian 4.0/ php5-cgi on chroot with suphp. The problem beggins when I try to run a command with system() function, it does not run command.I've also tryed with shell_exec, exec even ``. Any suggestion how to debug this situation? tnx in advance. Link to comment https://forums.phpfreaks.com/topic/146988-system-doesnt-work/ Share on other sites More sharing options...
trq Posted February 26, 2009 Share Posted February 26, 2009 Any suggestion how to debug this situation? You could start by posting the code in question. Link to comment https://forums.phpfreaks.com/topic/146988-system-doesnt-work/#findComment-771735 Share on other sites More sharing options...
vnv Posted February 26, 2009 Author Share Posted February 26, 2009 Good point <?php exec("id",$var); print_r($var); ?> And here's the code. Link to comment https://forums.phpfreaks.com/topic/146988-system-doesnt-work/#findComment-771827 Share on other sites More sharing options...
trq Posted February 26, 2009 Share Posted February 26, 2009 What do you get as the returned status? eg; <?php exec("id",$var,$ret); print_r($var); echo $ret; ?> Also you might try passing the full path to the command. <?php exec("/usr/bin/id",$var,$ret); print_r($var); echo $ret; ?> Link to comment https://forums.phpfreaks.com/topic/146988-system-doesnt-work/#findComment-772087 Share on other sites More sharing options...
vnv Posted February 27, 2009 Author Share Posted February 27, 2009 Array ( ) 127 This is the output. Link to comment https://forums.phpfreaks.com/topic/146988-system-doesnt-work/#findComment-772878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.