Crons run PHP5?

software development

#1

Does Crons use PHP4 by any chance? I have a domain that is running php5 and I am trying to set up a cron on it. However, I keep getting weird parsing errors each time the cron is run.

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/dakor/sms.dakor.ie/src/lib/Exceptions.php on line 12

this is line 12:
private $exceptionInfo;


#2

If you don’t specifically use PHP5 for cron jobs, it’ll run with the PHP4 interpreter. Instead of “php”, specify:

/usr/local/php5/bin/php


#3

Thanks Andrewf, that took care of it.