Jump to content

Fatal error: Uncaught Error: Attempt to assign property "timezone" on null


173rd Airborne

Recommended Posts

After waking up this morning to work on our Invision Community, I was greeted by this error instead of our home page:
Fatal error: Uncaught Error: Attempt to assign property "timezone" on null in /usr/www/oneseventhird/v3/system/Member/Member.php:205 Stack trace: #0 /usr/www/oneseventhird/v3/system/Log/Log.php(107): IPS\_Member::loggedIn() #1 /usr/www/oneseventhird/v3/init.php(1034): IPS\_Log::log() #2 [internal function]: IPS\IPS::exceptionHandler() #3 {main} thrown in /usr/www/oneseventhird/v3/system/Member/Member.php on line 205

Lines 203-205 of Member.php: 

if ( !static::$loggedInMember->member_id and isset( \IPS\Request::i()->cookie['ipsTimezone'] ) )
            {
                static::$loggedInMember->timezone = \IPS\Request::i()->cookie['ipsTimezone'];
            }


I attempted to access the Admin CP, which threw a different error: (500 Error)
Fatal error: Uncaught IPS\Db\Exception: Too many connections in /usr/www/oneseventhird/v3/system/Db/Db.php:269 Stack trace: #0 /usr/www/oneseventhird/v3/system/Db/Db.php(356): IPS\_Db->_establishConnection() #1 /usr/www/oneseventhird/v3/system/Db/Db.php(487): IPS\_Db->checkConnection() #2 /usr/www/oneseventhird/v3/system/Db/Db.php(972): IPS\_Db->preparedQuery() #3 /usr/www/oneseventhird/v3/system/Session/Admin.php(112): IPS\_Db->replace() #4 [internal function]: IPS\Session\_Admin->write() #5 [internal function]: session_write_close() #6 {main} thrown in /usr/www/oneseventhird/v3/system/Db/Db.php on line 269

Lines 267-269 of Db.php:

 

if( $error )
        {
            throw new \IPS\Db\Exception( $error, $errno );
        }

After experiencing a previous problem, we restored a backup of the site from 12AUG2023 yesterday which seemed to fix that issue. Unsure if this is related.

Edited by 173rd Airborne
Link to comment
Share on other sites

27 minutes ago, 173rd Airborne said:

Fatal error: Uncaught IPS\Db\Exception: Too many connections

This type of error usually happens when more queries are sent to the  database than can be processed. What is the value set for max_connections? That value will show how many concurrent connections the MySql server currently allowing.

 

27 minutes ago, 173rd Airborne said:

Fatal error: Uncaught Error: Attempt to assign property "timezone" on null in /usr/www/oneseventhird/v3/system/Member/Member.php:205 Stack trace: #0

What version of Ipb and php are you using? I think I've seeing a topic or 2 with this error before where it was mentioned that it was a bug.

Edited by Miss_B
Link to comment
Share on other sites

1 hour ago, 173rd Airborne said:

Fatal error: Uncaught Error: Attempt to assign property "timezone" on null in

Please ensure that you're using the latest release of the software on PHP 8.0 or PHP 8.1.

 

1 hour ago, 173rd Airborne said:

Fatal error: Uncaught IPS\Db\Exception: Too many connections in

Please contact your hosting provider as, @Miss_B mentioned, your database is not able to accept the number of connections you're using. You may need to configure your hosting properly or upgrade your package.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...