Can't i run php scripts with a crontab?

I got an error mesage on my email.

what da heck… it works without any problem on the cli.

can somebody help?

http://shareminer.com

Use full paths in cronjobs. Like:
12 * * * * /usr/bin/php ~/bin/myscript.php

I’m guessing at the php path, but it also depends on if you want php4 or php5. Do a ‘which php’ to get the full path, then test your script manually using full paths.

-Scott

http://wiki.dreamhost.com/index.php/Cron#Executing_a_PHP_Script_with_Crontabs

http://teamshocker.com

so, i need to define the full path to my php binary… i see… i will try that.

btw, i take the chance to get an answer to another question…
how do i run php5 scripts on the cli? i guess defining the full path should do it… but where is the php5 interpreter?

http://shareminer.com

You can always ask another question, but is usually better to put it in it’s own thread so others can find it easier

/dh/cgi-system/php5.cgi (from the Dreamhost wiki).

–rlparker