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

Fixed [102] timezone caused server error

Discussion in 'Resolved Bug Reports' started by Floris, Jun 8, 2011.

  1. Floris

    Floris Guest

    fresh host, domain, 1.0.2 .zip (full) and all that.

    went through install/ went through options/ under admin.php > changed seo, then changed timezone, and within 30 seconds i went through rebuild caches, and clicked on the page to focus the browser, just happen to go to server logs, which listed this one:

    Server Error Log

    Error Info​

    ErrorException: DateTimeZone::__construct() [<a href='datetimezone.--construct'>datetimezone.--construct</a>]: Unknown or bad timezone () -library/XenForo/Locale.php:79
    Generated By: Unknown Account, 12 minutes ago

    Stack Trace​

    #0 [internal function]: XenForo_Application::handlePhpError('') #1 /home/tbaec/public_html/library/XenForo/Locale.php(79): DateTimeZone->__construct(NULL) #2 /home/tbaec/public_html/library/XenForo/Visitor.php(388): XenForo_Locale::setDefaultTimeZone(false, Array) #3 /home/tbaec/public_html/library/XenForo/Session.php(199): XenForo_Visitor::setup(Object(Zend_Controller_Request_Http)) #4 /home/tbaec/public_html/library/XenForo/Controller.php(286): XenForo_Session::startPublicSession('Errornotfound') #5 /home/tbaec/public_html/library/XenForo/Controller.php(298): XenForo_Controller->_setupSession('Errornotfound') #6 /home/tbaec/public_html/library/XenForo/FrontController.php(309): XenForo_Controller->preDispatch(Object(XenForo_RouteMatch)) #7 /home/tbaec/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch() #8 /home/tbaec/public_html/index.php(13): XenForo_FrontController->run() #9 {main}

    Request State​

    array(3) { ["url"] => string(28) "http://example.com/favicon.ico" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
  2. Mike

    Mike XenForo Developer Staff Member

    We should probably never try to rewrite that favicon.ico path, which is really the cause of this. I think it's mostly dumb luck.

    The request was likely made after the tables were created, but before the options were actually inserted into the DB, so the guest account didn't have a time zone at that point.
  3. Mike

    Mike XenForo Developer Staff Member

    I've changed the htaccess to not redirect favicon.ico (though upgraders likely won't get that change automatically).

    I've also prevented the error from happening in the code in the first place.

Share This Page