cloudsoup

no soup, no clouds

Archive for the ‘Dreamhost’ tag

PHP problems in cron jobs at Dreamhost

leave a comment

Dreamhost, excellent hosting company on the whole but I had a php cron job setup that worked fine from my browser but failed with strange error messages when run from the command line.

Could it be, I wondered, that the path to php I’d given in my cron job wasn’t the path to the version of php I was running on the website. And that was the problem. My website was running 5.x but from the command line I was running 4.x

A quick fix so that the cron job referenced the path to php 5:

30 14 * * * * /usr/local/php5/bin/php [path to my script]/writeHolidayArray.php

and everything worked fine.

Written by David

July 13th, 2009 at 6:27 pm

Posted in Science and Technology

Tagged with , , ,