FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

PHP Problem: Unable to execute ext. commands

 


Naif
The topic of the post says everything about the problem. Whenever I try to execute a command using exec(), I get this as an error:

Warning: exec() [function.exec]: Unable to fork [dir] in d:\Inetpub\wwwroot\programs\exec.php on line 2

The PHP code is as follows:

Code:

<?php
    echo exec("dir");
?>


I am running IIS on Windows XP SP2, with PHP 5. Not only exec() but I am unable to use any of the functions which can be used to invoke an external command like system(), passthru(), etc.

What do you think is going wrong? Is there something I need to enable in the php.ini configuration file?
dandelion
Probably you run PHP in safe mode.
If so, you need to set the safe_mode_exec_dir directive to the directory where your script is located.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.