Web Hosting Forum | Lunarpages

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
May 24, 2015, 07:24:41 PM

Pages: [1]   Go Down
Author Topic: Cron-launched php script fails in lpcp - ok in cpanel  (Read 9434 times)
Offline Offline

Posts: 5

« on: September 18, 2012, 01:46:28 AM »

A php script launched in cron on lpcp failed, whereas the same script works ok on a cpanel account (I have both).  Because of compile errors not showing on lpcp setup it was failing with white screen of death which produced no results - i.e. it looked as though the cron wasnt running.  Lp support hung in there with me on this for a couple of weeks (!).  But they were very focussed on "our stuff working brill - must be your stuff going wrong".  This encouragement did keep me on the debugging trail.  I'm pretty sure the prob is that the $_SERVER variables output /usage whatever is different on lpcp cron.  I didnt actually get to the bottom of the issue.  I just got cron to run the script with curl instead of php and it works ok.
Senior Moderator
Berserker Poster
Offline Offline

Posts: 5992

« Reply #1 on: September 18, 2012, 04:56:41 AM »

Sorry to hear that you had trouble with cron.

Something to always keep in mind when using cron is that you can never make any assumptions about the exact starting directory, environment variables, PATH, PHP version available, server settings, or much else. You always have to hard code in all these things.

Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-
Intergalactic Cowboy
Offline Offline

Posts: 66

« Reply #2 on: January 04, 2014, 10:28:04 AM »

I guess for me, it's like  a trial and error thing. Just make sure that you learned something from that experience though.
« Last Edit: January 04, 2014, 10:30:37 AM by dwaynnyt » Logged
Pages: [1]   Go Up
Jump to: