Executing Shell Scripts

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
flanakin
Forum Newbie
Posts: 7
Joined: Wed Dec 08, 2004 6:50 am
Location: Alabama

Executing Shell Scripts

Post by flanakin »

I'm new to PHP and have just setup a server for the first time. Because of issues with how the server was setup before adding PHP, it had to be setup using IIS. Now, there's an open source tool that I'm using and it needs to run a command. I'm not sure why, but it's not working. I've done some searching and have found that safe_mode must be turned off. I checked this 3 ways: php.ini, [php_man]php_info[/php_man](), and [php_man]var_dump[/php_man]([php_man]ini_get[/php_man]('safe_mode')). The results I get are Off, Off, and string(0) "". I changed the php.ini file to 0 and received string(1) "0" for the [php_man]var_dump[/php_man](), but I'm not sure if any of that matters. Either way, my [php_man]popen[/php_man]() call is not working.

If anyone could help me figure out what's going on here, I'd appreciate it. Thanks.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

whats the error message?

post your code too
flanakin
Forum Newbie
Posts: 7
Joined: Wed Dec 08, 2004 6:50 am
Location: Alabama

Post by flanakin »

Actually, there is no error message, which is driving me crazy. When something doesn't work, it just stops. Nothing else gets processed and nothing gets displayed to the screen. I wish I knew why this was.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

in php.ini make sure

display_errors = On



also put this at the top of the script

error_reporting(E_ALL);


popen() could be disabled, but i think php would give you an error.

and of course make sure the popen() call is actually valid
Post Reply