Executing a php script..

MAbans

Registered
Ok, I'm planning running a php script using the crontab daemon. So to experiement, I tried to executing through the command-line but I get an error.

This is my error.
PHP:
command not found

So obviously I'm doing something wrong. Will i get this same error if I put this to be automated? What is the proper way to execute a php script using the command-line? What is the proper way to execute a php script using the Crontab? Thanks in advance.
 
Which command is 'not found'.

If you didn't, try the php command:

Code:
php script.php

If that doesn't work, find where the php binary is installed:

Code:
whereis php

Also see

Code:
man php
 
Back
Top