PDA

View Full Version : Getting a php fatal error.


rex_b
09-21-2004, 01:42 PM
This error:

Fatal error: Call to a member function on a non-object in /home/*************/public_html/forum/includes/cron/threadoftheday.php on line 23


As you notice it's for the threadoftheday.php

Jolten
09-21-2004, 02:06 PM
>=

should just be >

rex_b
09-21-2004, 02:31 PM
still no worky. same error

Zachery
09-21-2004, 02:56 PM
This error:

Fatal error: Call to a member function on a non-object in /home/*************/public_html/forum/includes/cron/threadoftheday.php on line 23


As you notice it's for the threadoftheday.php
How are you trying to run the cron?

rex_b
09-21-2004, 03:05 PM
I was just trying to call it up via browser and got those errors. Otherwise it will be cron'd in the scheduled tasks.

filburt1
09-21-2004, 04:23 PM
I was just trying to call it up via browser and got those errors. Otherwise it will be cron'd in the scheduled tasks.
You cannot directly execute cron scripts. Instead, go to the Scheduled Tasks section of the Admin CP and run it from there.

You are getting the error because cron scripts needs to be wrapped with a bunch of vB code before they can be executed (in this case, global.php creates $DB_site, and because the file isn't wrapped by vB, it doesn't have $DB_site defined).