I'd look for permissions. Maybe apache or www or nobody can't execute your script. Chmod your shell script to 777 then try it.
I had a similar issue using convert, where my isp didn't have imageMagick installed, so there was no convert, hence my exec didn't do doodlisquat.
Try doing:
<?php
exec(whatever.sql) or die("cant execute")
?>
With the key part being to die and give an erro if it doesn't work.