Once PHP is working at the command line, try accessing the script via the browser again.
Once PHP is working at the command line, try accessing the script via the browser again. If it still fails then it could be one of the following: