Unusual error in store log files

Open to all! Ask other shopowners for help.
Post Reply
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Unusual error in store log files

Post by 14Steve14 »

I am getting this error warning in the stores log files.

Code: Select all

[30-Jun-2024 11:39:16 Europe/London] PHP Warning:  session_start(): Failed to decode session object. Session has been destroyed in /home/####/####/includes/system/versioned/1.0.8.3/session.php on line 55
[30-Jun-2024 11:39:16 Europe/London] PHP Fatal error:  Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in /home/####/####/includes/system/versioned/1.0.8.3/mysql_session.php:26
Stack trace:
#0 /home/####/####/includes/system/versioned/1.0.8.3/mysql_session.php(26): mysqli_num_rows()
#1 [internal function]: mysql_session->gc()
#2 /home/####/####/includes/system/versioned/1.0.8.3/session.php(55): session_start()
#3 /home/####/####/includes/system/segments/application/start_session.php(50): Session::start()
#4 /home/####/####/includes/application_top.php(42): require('/home/####/...')
#5 /home/####/####/index.php(13): require('/home/####/...')
#6 {main}
  thrown in /home/####/####/includes/system/versioned/1.0.8.3/mysql_session.php on line 26
Can anyone help decipher the cause as I have no idea where to start looking.


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Unusual error in store log files

Post by ecartz »

Have you applied https://github.com/CE-PhoenixCart/Phoen ... 75fd439c21

It's from 1.0.9.3, so you may not have applied it as part of the normal update process if you're on a lower version. This would cause the second (Fatal error) message, not the warning.

The first line is complaining that someone is trying to use a session that has a problem that is keeping it from being decoded. This could be caused by a number of things. Some discussion at https://stackoverflow.com/q/34944892/6660678 and the related questions (right column). If that is happening frequently, you could try changing the type of value in the sessions table from TEXT to MEDIUMTEXT and see if that helps.
14Steve14
Senior Contributor
Posts: 923
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Unusual error in store log files

Post by 14Steve14 »

@ecartz . Thanks very much. Comprehensive answer as always. Forgot to mention I am on 1.0.9 and php8.

I have made the first change so will see if it has helped. Hopefully it will.

I have cleared the error logs and will see what happens.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply