Partner and Community Forums
PHP exec() doesn't work
Last post Aug 23, 2011 12:26 AM by Ibran Siagian
Apr 21, 2008 05:04 AM|toeh101|LINK
I tried to use exec() to create directory, but it doesn't work.
I have turned safe_mode off and added user permission to cmd.exe .
There are no error showed.
But there are no directory created .
<< But when I tried on Appserv, it's work. >>
exec(" md example_dir ");
How to solve the problem.
Apr 21, 2008 05:49 AM|ganeshanekar|LINK
How are you running PHP? Is it correctly configured?
Do you have any error message Snap-shot?
Apr 21, 2008 01:11 PM|brashquido|LINK
PHP/IIS will need to read/execute permissions to the command you are trying to execute with your exec() function. Have a read of my article on troubleshooting the
Warning: exec() [function.exec]: Unable to fork error for PHP and IIS which will tell you how to get the exec() function working.
Aug 23, 2011 12:26 AM|Ibran Siagian|LINK
I try to run this script:
echo exec("c:/myfol/myapp.exe > mytext.txt 2>&1");
the page shows a blank page, but myapp.exe never successfully executed. Did I miss something?