DominicWatson Posted July 19, 2008 Share Posted July 19, 2008 Hi all, I'm running PHP on Windows server 2003 with IIS 6.0 and I am getting nothing out of exec(), pass_thru(), et al. Ie. If I run the following script, I get the output 'Hello world': <?php echo 'Hello'; echo `ipconfig`; echo ' world'; ?> If I type ipconfig in the command prompt, I get the expected output. Using the above code on my Vista laptop also produces the expected output (running PHP on Apache). I have checked the php.ini file for possible causes but I am an uber php noob so I don't really know what I am looking for beyond SAFE_MODE = OFF (which it is). Any direction would be greatly appreciated. Thanks for your time, Dominic Link to comment https://forums.phpfreaks.com/topic/115597-calls-to-exec-pass_thru-et-al-do-nothing-it-seems/ Share on other sites More sharing options...
ignace Posted July 19, 2008 Share Posted July 19, 2008 isn't it <?php echo exec('ipconfig'); ?> Link to comment https://forums.phpfreaks.com/topic/115597-calls-to-exec-pass_thru-et-al-do-nothing-it-seems/#findComment-594272 Share on other sites More sharing options...
DominicWatson Posted July 19, 2008 Author Share Posted July 19, 2008 isn't it <?php echo exec('ipconfig'); ?> The following all execute system commands but in slightly different ways: <?php echo exec('ipconfig', $outputArray); echo pass_thru('ipconfig'); echo `ipconfig`; ?> None of them work in the Windows 2003 setup though they all work on my Vista setup. I'm assuming its a security / user issue but I'm not really hot on those things. Dominic Link to comment https://forums.phpfreaks.com/topic/115597-calls-to-exec-pass_thru-et-al-do-nothing-it-seems/#findComment-594415 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.