there is an error about read data for start_session () with php 7.1
"Warning: session_start(): Failed to read session data: user (path: ) in /usr/share/webapps/piwigo/include/common.inc.php on line 149"
So session does not start, and you can't login.
To resolve this, I have add in the file :
piwigo/include/functions_session.inc.php, function pwg_session_read($session_id), the following to check if the data is null :
if ($result)
{
$row = pwg_db_fetch_assoc($result);
if (is_null($row['data'])) {
return '';
}
return $row['data'];
}
else
{
return '';
}
I am not sure it is the best test to do, but it work well
there is an error about read data for start_session () with php 7.1
"Warning: session_start(): Failed to read session data: user (path: ) in /usr/share/webapps/piwigo/include/common.inc.php on line 149"
So session does not start, and you can't login.
To resolve this, I have add in the file :
piwigo/include/functions_session.inc.php, function pwg_session_read($session_id), the following to check if the data is null :
if ($result)
{
$row = pwg_db_fetch_assoc($result);
if (is_null($row['data'])) {
return '';
}
return $row['data'];
}
else
{
return '';
}
I am not sure it is the best test to do, but it work well
<!-- github-sync-id:203953157 -->
PHP : PHP 7.1.1 (cli) (built: Jan 18 2017 18:44:22) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.1, Copyright (c) 1999-2017, by Zend Technologies
Web Server: Server version: Apache/2.4.25 (Unix) Server built: Dec 20 2016 13:02:22
Host: Linux 3.14.32-xxxx-grs-ipv6-64 #7 SMP Wed Jan 27 18:05:09 CET 2016 x86_64 GNU/Linux
I think it is due to PHP 7.1 as it return null value when there is no result from sql queries.
It look like it is a common issue for all webapp who use database to store session.
Version 7.1.0
01 Dec 2016
Core:
Added nullable types.
....
PHP :
`
PHP 7.1.1 (cli) (built: Jan 18 2017 18:44:22) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.1, Copyright (c) 1999-2017, by Zend Technologies
`
Web Server:
`
Server version: Apache/2.4.25 (Unix)
Server built: Dec 20 2016 13:02:22
`
Host:
`
Linux 3.14.32-xxxx-grs-ipv6-64 #7 SMP Wed Jan 27 18:05:09 CET 2016 x86_64 GNU/Linux
`
I think it is due to PHP 7.1 as it return null value when there is no result from sql queries.
It look like it is a common issue for all webapp who use database to store session.
http://www.php.net/ChangeLog-7.php#7.1.0
> Version 7.1.0
> 01 Dec 2016
> Core:
> Added nullable types.
> ....
<!-- github-comment-id:276060368 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
there is an error about read data for start_session () with php 7.1
"Warning: session_start(): Failed to read session data: user (path: ) in /usr/share/webapps/piwigo/include/common.inc.php on line 149"
So session does not start, and you can't login.
To resolve this, I have add in the file :
piwigo/include/functions_session.inc.php, function pwg_session_read($session_id), the following to check if the data is null :
if ($result)
{
$row = pwg_db_fetch_assoc($result);
if (is_null($row['data'])) {
return '';
}
return $row['data'];
}
else
{
return '';
}
I am not sure it is the best test to do, but it work well
Hello
version of php/piwigo/server etc please ?
Thank you
PHP :
PHP 7.1.1 (cli) (built: Jan 18 2017 18:44:22) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.1, Copyright (c) 1999-2017, by Zend TechnologiesWeb Server:
Server version: Apache/2.4.25 (Unix) Server built: Dec 20 2016 13:02:22Host:
Linux 3.14.32-xxxx-grs-ipv6-64 #7 SMP Wed Jan 27 18:05:09 CET 2016 x86_64 GNU/LinuxI think it is due to PHP 7.1 as it return null value when there is no result from sql queries.
It look like it is a common issue for all webapp who use database to store session.
http://www.php.net/ChangeLog-7.php#7.1.0
And it is for piwigo 2.8.5
try 2.8.6
same with 2.8.6
ok Thx!
@FanchTheSystem is it still a problem with PHP 7.1.5 ?
Yes it work well with php 7.1.5 and piwigo 2.9.0
Thank you!
Great :-) let's close this issue then!