Forum Moderators: coopster

Message Too Old, No Replies

Cron Tab issues

         

CrazyPhil

2:53 pm on Oct 17, 2008 (gmt 0)

10+ Year Member



My crons have been working great for over a year then all of a sudden stopped working...
My cron is:
/usr/bin/php -q /home/crazyphi/public_html/oms/admin/cronRun_night.php cur_db=3

Usually this runs fine, passing the cur_db=3 var through $_GET['cur_db'], but that is not working any more.
Also before that happens my includes stopped working:

Warning: include(../config.php): failed to open stream: No such file or directory in ..

Oddly, its like the "../" isn't bringing it down a level anymore, and "./../" isn't working either.

To temporarily fix this issue I had to put the variable directly into the db file, and add the paths manually into the include file. The odd thing is this script runs normally from HTTP.

What changes server-side are causing this issue? (Since my host is too slow to respond).

Thanks,

--CP

eelixduppy

3:33 pm on Oct 17, 2008 (gmt 0)



you cannot use relative paths in a cron because the script is not run from the same directory as it resides. Try changing all your paths to absolute ones and it should work.

And welcome to webmasterworld!

CrazyPhil

4:39 pm on Oct 17, 2008 (gmt 0)

10+ Year Member



Hey eelixduppy,

Whats odd is that my crons have always worked with this path setup, I never changed any of my scripts, and besides that cronRun_night.php cur_db=3 <- the cur_db variable isn't passing now either. This was working before too. I know my host changed something because the night cron ran at 2:00 AM, and the day cron failed at 2:00 PM, and ever since neither have worked.

eelixduppy

2:53 pm on Oct 22, 2008 (gmt 0)



Hey did you ever get this working?

CrazyPhil

7:41 pm on Oct 22, 2008 (gmt 0)

10+ Year Member



I had to modify my db file, my include file and create 6 files to run the scripts where there was once two. Still unsure why I can't pass variables anymore, and why I need the complete path when I didn't before!

Thnx