If you’re running PHP scripts through the command line (crontab or via a bash shell), you can get the following output:
localuser@host ~# php myscript.php
...
sh: /php: No such file or directory
...
That mostly happens when you have code like this active.
passthru("php other.php");
exec("php other.php");
shell_exec("php other.php");
...
First thing to check would be if “php” is a registered binary. Run the following as the user that is running your PHP script (hopefully not the root user).
localuser@host ~# which php
/usr/bin/php
If you get no response, try to add the full path to the PHP binary into your script.
passthru("/usr/bin/php other.php");
exec("/usr/bin/php other.php");
shell_exec("/usr/bin/php other.php");
(Use whatever path the which php command reported above; /usr/bin/php is just the common one.)
If you do get a response and it still fails, the call is probably being blocked. On old PHP (5.3 and earlier) the usual culprit was safe_mode, which blocked the execution of other scripts via these calls when it was On. safe_mode was deprecated in PHP 5.3 and removed in PHP 5.4, so on any modern PHP it no longer exists. Instead, check the disable_functions directive in your php.ini: if passthru, exec or shell_exec are listed there, they’re disabled and will fail.