go to bug id or search bugs for
i wrote a script with something like the following:
exec("touch somefile") or die("couldnt create file!");
and it worked fine in php 4.0.1
but when i upgraded to 4.0.2 the exec kept dying even though there was no error.
when i upgraded to 4.0.3 it still did not work.
i've also tried replacing exec() with a system() call and that did not help.
note: permissions have not changed on any dirs so that's not the problem, and exec doesn't return any errors (or any output at all for that matter) into the error array or anywhere else
Add a Patch
Add a Pull Request
This inteded function of exec.
string exec (string command [, string array [, int return_var]])
You need to test return_val which will be the error condition.
exec("touch hi",,$err); if ($err) die("Could not create file");