1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug XF 1.2 Upgrade - Cron Error

Discussion in 'Resolved Bug Reports' started by Alien, Aug 20, 2013.

  1. Alien

    Alien Well-Known Member

    After successful upgrade, this showed up waiting for me (two listings) in the server error logs.

    It also now occurs once every minute. All updated files were uploaded...

    Server Error Log
    Error Info
    ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
    Generated By: Unknown Account, A moment ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    Request State
    array(3) {
    ["url"] => string(41) "http://***.***.com/cron.php?1349611467"
    ["_GET"] => array(1) {
    [1349611467] => string(0) ""
    }
    ["_POST"] => array(0) {
    }
    }
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    Have you updated your templates?

    Does it occur when add-ons are disabled?
     
  3. Alien

    Alien Well-Known Member

    I will test all add-ons disabled, and yes all templates are 100% correct.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    The XenForo_Cron system was replaced with a deferred system, so it looks like an add-on may be calling a cron that is no longer available (due to the update in systems). Most likely need to test one by one to find out which one doesn't work.
     
    Alien likes this.
  5. Alien

    Alien Well-Known Member

    OK disabling add-ons still produced the error, but it could be an add-on's additional cron entries as you have stated.

    I had 4 addon-related cron entries there, and I've now disabled those manually as well to test. I'll then enable them one by one to see which is the culprit and post the results.
     
  6. Alien

    Alien Well-Known Member

    OK, I was getting them sometimes even 3-4 times within a minute.

    Now that I have disabled the 4, I have not yet received new error log listings...

    I'll give it 10 minutes, then re-enable them and isolate it. Could be taigachat (2 entries), digitalpointspy, or my custom confessions cron.
     
  7. digitalpoint

    digitalpoint Well-Known Member

    Check your templates for cron.php (I forget what template it was in before 1.2)... It's no longer a valid file in XenForo. My guess is you have a customized template that still has it.
     
    Alien likes this.
  8. Alien

    Alien Well-Known Member

    I have no cron.php in any templates.

    I also re-uploaded all cron-related files from the original package downloaded earlier today, in case something went corrupt during upload. Errors still occurred.

    I also tried isolating the cron entries, and re-enabled them one by one and now don't get any error at ALL.

    This is puzzling to be sure...
     
  9. digitalpoint

    digitalpoint Well-Known Member

    Well *something* is making end user's browser call cron.php. On a side note, you can delete cron.php, since it's not even part of 1.2 (it's left over from old version), and at least you won't get server errors logged, but the server will still kick back a 404 for requests for it. Still doesn't get to the root of the issue of what is making cron.php get called though... Maybe it's a search engine spider that is respidering it or something... might want to check web server logs to check user agent.
     
    Alien likes this.
  10. Alien

    Alien Well-Known Member

    I've re-enabled all add-ons and crons, and so far no additional error messages.

    I usually go through and remove all files that are no longer used in the latest package, so I don't *think* I have any cron.php anymore but I'll double check thanks for that.

    I'll also check the web logs to see if I had some cron.php hits during my error window!
     
  11. Alien

    Alien Well-Known Member

    cron.php was indeed located in the root, I bet I directory compared every sub BUT the root! lol
     
  12. digitalpoint

    digitalpoint Well-Known Member

    Well it still doesn't solve *why* it was being hit though... If you use the option of sending templates to the file system for use, I'd just grep your whole website directory and see if it's ANYWHERE... in any PHP files, JS files, templates, etc...
    Code:
    grep -R cron.php
     
    Alien and Steve F like this.
  13. polle

    polle Active Member

    I just upgrade to 1.2.1 and I am getting the exact same error log.

    Code:
    Error Info
    ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
    Generated By: Unknown Account, 6 minutes ago
    
    Stack Trace
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    
    Request State
    array(3) {
      ["url"] => string(49) "http://www.site.com/forum/cron.php?1360519619"
      ["_GET"] => array(1) {
        [1360519619] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    Anyone knows a fix ?
     
  14. Alien

    Alien Well-Known Member

    I noticed that after removing the file and waiting about 30 minutes, all errors seem to go away and I haven't had it occur again.

    Of course, before I did that I turned off and on all my add-ons and crons manually trying to isolate the problem. Some combination of that seems to work.

    I also did what digitalpoint suggested above, and I had *no* occurrences of calls to that outdated cron.php file on my server. Weird.
     
  15. digitalpoint

    digitalpoint Well-Known Member

    Did you check your web logs to see "who" was triggering it? Maybe search engine spider that saw it before or something?
     
  16. surfsup

    surfsup Well-Known Member

    I am getting this error from updating 1.1.5 to 1.2.2

    Code:
    Error Info
    ErrorException: Fatal Error: Class 'XenForo_Cron' not found - cron.php:12
    Generated By: Unknown Account, A moment ago
    Stack Trace
    
    #0 [internal function]: XenForo_Application::handleFatalError()
    #1 {main}
    
    Request State
    
    array(3) {
      ["url"] => string(51) "http://www.truckmountforums.com/cron.php?1375595563"
      ["_GET"] => array(1) {
        [1375595563] => string(0) ""
      }
      ["_POST"] => array(0) {
      }
    }
    
    Do I delete that file cron.php in root? or what?
     
  17. digitalpoint

    digitalpoint Well-Known Member

    cron.php isn't part of 1.2.x, so yes.
     
    surfsup likes this.

Share This Page