FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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.
Related topics
simple php problem, please help...
A PHP problem !
HTML + PHP problem
A php problem
PHP problem...
[PHP] Faking Shell Access Through PHP
PHP Problem...
[PHP] Problem with Dynamic Sig's Font Color
Form and PHP problem
PHP imagecreate + CSS problem.
PHP imagecreate + CSS problem.
Could there be a PhP problem on the server?
[help]Mysql & php problem
Need help with watermarks
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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