Wrapping PHP in itself
This is a mental note to myself. Somethings using pre-installed VPS the PHP executed by Apache is lacking the necessary permissions to run binary files (shellscript and built-in commands works fine though). It doesn't generate errors, it simply doesn't work.
Those VPS often has the PHP-CGI version installed and thus you can:
#!/usr/bin/php
<?
exec('/home/user/www/mybinaryfiletoexecute');
?>
Note that the binary file must be in your www-dir.
Those VPS often has the PHP-CGI version installed and thus you can:
- Make your PHP script execute a shell script
- Init the shell script with PHP-CGI
- Execute
#!/usr/bin/php
<?
exec('/home/user/www/mybinaryfiletoexecute');
?>
Note that the binary file must be in your www-dir.

Leave a comment