PHP *is* shell, just use "#!/bin/php" in the first line and "<?php" in line two followed by your php code. Remember, the /etc/php/cli/php.ini (or similar, depending on your distribution) is used for command line while there is another version for apache and other webservers.