Piwigo.org

You are not logged in. (Register / Login)

Announcement

#1 2016-12-09 05:59:13

Matt Bergman
Guest

"Failed to Read Session Data" + Cannot Login

Hey guys, I've been messing around with this error on my own for a bit and I've given up. 

I get this alongside a login/"Welcome to Your Piwigo Gallery" page:

Warning: session_start(): Failed to read session data: user (path: /home/497/307497/tmp) in /home/497/307497/public_html/include/common.inc.php on line 149

It won't login, but if given a wrong password it will take me to the identification.php page. Tried to chmod 777 the tmp folder and then doing a clean install, but without any results.  The database tables do get imported successfully.

Screenshot:
https://postimg.org/image/bxzg5jdvn

I'm not too experienced with web servers so I pretty much poke at it until something happens.

Piwigo version: 2.8.3
PHP version: 5.2

 

#2 2016-12-18 22:08:46

Zentalquabula
Member
Registered: 2014-05-10
Posts: 55

Re: "Failed to Read Session Data" + Cannot Login

I get this too on my local test site, after upgrading to PHP 7.1

https://bugs.php.net/bug.php?id=73616 has some information.

Problem remains in Piwigo 2.9.0b. As it is a test site, I don't care, but it should be investigated by Piwigo team.

Offline

 

#3 2016-12-21 18:38:09

plg
Piwigo Team
Location: Nantes, France, Europe
Registered: 2002-04-05
Posts: 12949
Website

Re: "Failed to Read Session Data" + Cannot Login

Offline

 

#4 2016-12-21 18:46:23

rvelices
Piwigo Team
Registered: 2005-12-29
Posts: 1945
Website

Re: "Failed to Read Session Data" + Cannot Login

Actually there might be a problem with our code. Can someone test this ?
in include/functions_session.inc.php , function session_read, replace

Code:

if ($results)

with

Code:

if (pwg_db_num_rows($results))

Last edited by rvelices (2016-12-21 18:46:36)

Offline

 

#5 2016-12-21 19:05:21

plg
Piwigo Team
Location: Nantes, France, Europe
Registered: 2002-04-05
Posts: 12949
Website

Re: "Failed to Read Session Data" + Cannot Login

dotdeb doesn't propose PHP 7.1 yet, I can't test it "easily" :-/

Offline

 

#6 2016-12-21 19:07:12

plg
Piwigo Team
Location: Nantes, France, Europe
Registered: 2002-04-05
Posts: 12949
Website

Re: "Failed to Read Session Data" + Cannot Login

On [Github] Piwigo issue #586 mirlang says rvelices patch works fine.

Offline

 

#7 2016-12-21 21:16:20

Zentalquabula
Member
Registered: 2014-05-10
Posts: 55

Re: "Failed to Read Session Data" + Cannot Login

I can confirm patch works.

Not related, but another warning pops up: Got error 'PHP message: PHP Warning:  A non-numeric value encountered in /(...)/include/template.class.php on line 1791\n'

plg wrote:

On [Github] Piwigo issue #586 mirlang says rvelices patch works fine.

Offline

 

#8 2016-12-31 20:16:32

Serge D
Member
Location: US
Registered: 2014-07-15
Posts: 307

Re: "Failed to Read Session Data" + Cannot Login

Actually patch does not work because it is $result and not $results
Code which does work in 2.8.4 is
{code}
  $result = pwg_query($query);
  if (pwg_db_num_rows($result))
{/code}

Offline

 

#9 2017-01-03 19:46:16

Serge D
Member
Location: US
Registered: 2014-07-15
Posts: 307

Re: "Failed to Read Session Data" + Cannot Login

This fix did not make into 2.8.5 which is unfortunate
I have to reapply fix manually

Offline

 

#10 2017-01-06 03:59:44

reddn
Member
Location: DC, USA
Registered: 2015-09-29
Posts: 26

Re: "Failed to Read Session Data" + Cannot Login

Am I correct in saying PHP 7.1 is not supported at this time?

Offline

 

#11 2017-01-06 19:08:23

Serge D
Member
Location: US
Registered: 2014-07-15
Posts: 307

Re: "Failed to Read Session Data" + Cannot Login

unless you hot fix the code yourself, yes

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2017 · Contact