Link to home
Start Free TrialLog in
Avatar of ksoszka
ksoszkaFlag for United States of America

asked on

Cron Job error in WordPress Php Functions

Hi, while using a Cron Job setup at Go Daddy to run a functions.php file on my self-hosted WordPress site, it does not work and I receive an error message from the Go Daddy system which is below. I cannot figure out what it is trying to tell me, or what I might be doing wrong. Thanks in advance..

Warning: require_once(STYLESHEETPATH/library/filters.php) [function.require-once]: failed to open stream: No such file or directory in

/home/content/32/9737732/html/wp-content/themes/auto-magic-content-robot/functions.php on line 3

Fatal error: require_once() [function.require]: Failed opening required 'STYLESHEETPATH/library/filters.php'

(include_path='.:/usr/local/php5/lib/php') in /home/content/32/9737732/html/wp-content/themes/auto-magic-content-robot/functions.php on line 3
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

It cannot find STYLESHEETPATH/library/filters.php  Probably the path needs more qualification.  Cron runs in the os environment; not the web environment, so you may have to specify the path starting with your root; or it might just want a leading slash:
/STYLESHEETPATH/library/filters.php  (but that would be too easy).

Cd&
Avatar of ksoszka

ASKER

Hi, thank you - I went with the full path, and the original errors were replaced by this:

Fatal error: Call to undefined function add_filter() in /home/content/32/9737732/html/wp-content/themes/auto-magic-content-robot/library/filters.php on line 62

Line 62 of the filters.php file that it refers to is:

add_filter('arras_postheader', 'my_postheader');

I sense that this might cascade if we keep going, so here is some background info in case there is an obvious root to the problem...

I am using a theme (auto-magic-content-robot) which is a child theme of the "Arras" theme. The functions file of the child theme contains programming which is designed to run with wp scheduled events. It worked fine, until I sold the site and moved it from my own Go Daddy hosting to the buyer's Go Daddy hosting. The Cron Job is an attempt to see if I could get it to work again. I have had this happen before when I move one of these sites. Apparently I should do something differently somewhere, either in the moving process or in the code.

I should also add that if I manually run the programming that is set up to use wp scheduled events, it works. Only the ability to make it run automatically is not working.
ASKER CERTIFIED SOLUTION
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ksoszka

ASKER

Thank you, I will look at the filters.php to see if there is a definition of the function that may be failing.
Avatar of Jason C. Levine
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.