Cron.php won't run (required php version mismatch error)

8 posts by 4 authors in: Forums > CMS Builder
Last Post: June 1, 2016   (RSS)

By gkornbluth - May 22, 2016

Hi All,

I recently upgraded to V 3.04 and decided to try autobackup V1.04

 I’ve set up a cron job on the server (Bluehost) using the code suggested on the Admin > General tab:

php -q /home1/susansa7/public_html/susansaladino/cmsAdmin/cron.php

The cron job does run every minute, however the resulting cron job emails read:

"This program requires PHP v5.5.0 or greater. You have PHP v5.2.17 installed.<br/> Please ask your server administrator to upgrade PHP to a newer version.<br/><br/>"

However the Server Info on the Admin > General tab says that the site is using PHP v5.6.17

The server is set up to use a single php.ini file and I couldn’t find any conflicting .ini or .htaccess files on the site.

Any thoughts?

Thanks.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Damon - May 23, 2016

Hi Jerry,

I had the same issue with one my own site installations giving me the same error.

I was using something similar to this:

php -q /home1/susansa7/public_html/susansaladino/cmsAdmin/cron.php

Turns out that php was pointing to an older version of php (the server has multiple versions of PHP).

I needed to change 
php

to 
/usr/local/php55/bin/php

and the email error stopped. 

Check with your host what the path you should be using.

Let me know if this solves the issue.

Thanks!

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By gkornbluth - May 31, 2016

Thanks Damon,

As with the other post, I never get an email telling me that this thread had been updated, sorry for the delay in responding.

I'll give it a try tomorrow morning and report back.

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By mizrahi - June 1, 2016

I have the situation, also with bluehost, so if you could post your final resolution it would be greatly appreciated. 

By gkornbluth - June 1, 2016 - edited: June 1, 2016

Hi mizrahi,

The solution seems to be as Damon suggested.

I'm on a Bluehost shared hosting platform and running php 5.6 as a single php.ini file, so changing:

php -q /home1/susansa7/public_html/susansaladino/cmsAdmin/cron.php to php56s -q /home1/susansa7/public_html/susansaladino/cmsAdmin/cron.php

did the trick.

Hope it works for you...

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By mizrahi - June 1, 2016

Thanks. Updating now.

By Dave - June 1, 2016

Hi All, 

The issue is that some hosts have multiple PHP versions available, so when you just enter php /path/to/script for the cron script it sometimes runs the older version of PHP and not the one you want.

If you are able to upgrade to CMSB 3.05 I added some code to attempt to detect and display the proper path to PHP on the Scheduled Tasks menu under Admin.  It's not supported by all servers, but does work on most and will show you the correct path.

For any other servers, you can just email your host and ask them the right path to use for PHP 5.6 when setting up cron jobs and they should be able to tell you right away.

Hope that helps!  Let me know any other questions.

Dave Edis - Senior Developer
interactivetools.com