New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwigo 2.8.3 session_start() - error with PHP 7.1 on Windows Server 2016 (IIS10) #586

Closed
mcinternet opened this Issue Dec 21, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@mcinternet

mcinternet commented Dec 21, 2016

Hello,

I cannot login on a fresh installation and on an older one I have a lot of problems regarding this error. With other application (like wordpress or others) there are no errors. So the problem must be in the piwigo. I am not a php-crack therefore I ask here to get help.

Error: Warning: session_start(): Failed to read session data: user (path: ) in ..... include\common.inc.php on line 149

The same is with a fresh piwigo 2.9b installation on line 156 - and there I cannot login.

kind regards

mcinternet

@mirlang

This comment has been minimized.

Show comment
Hide comment
@mirlang

mirlang Dec 21, 2016

same here, started after upgrade to php-7.1

Warning: session_start(): Failed to read session data: user (path: /tmp) in /var/www/default/gal/include/common.inc.php on line 156

/tmp has proper permission

mirlang commented Dec 21, 2016

same here, started after upgrade to php-7.1

Warning: session_start(): Failed to read session data: user (path: /tmp) in /var/www/default/gal/include/common.inc.php on line 156

/tmp has proper permission

@mcinternet

This comment has been minimized.

Show comment
Hide comment
@mcinternet

mcinternet Dec 21, 2016

tmp / _data also has proper permissions

regards

mcinternet commented Dec 21, 2016

tmp / _data also has proper permissions

regards

@plegall

This comment has been minimized.

Show comment
Hide comment
@plegall

plegall Dec 21, 2016

Member

Hi @mcinternet and @mirlang it sounds "a lot" like http://piwigo.org/forum/viewtopic.php?id=27103 where Zentalquabula seems to have found how it could be fixed.

Member

plegall commented Dec 21, 2016

Hi @mcinternet and @mirlang it sounds "a lot" like http://piwigo.org/forum/viewtopic.php?id=27103 where Zentalquabula seems to have found how it could be fixed.

@mirlang

This comment has been minimized.

Show comment
Hide comment
@mirlang

mirlang Dec 21, 2016

no time to register in the forum, so i'm replying here: i tried rvelices' suggestion, which works for me :)

diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index e75f22e12..9d887355d 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -145,7 +145,7 @@ SELECT data
   WHERE id = \''.get_remote_addr_session_hash().$session_id.'\'
 ;';
   $result = pwg_query($query);
-  if ($result)
+  if (pwg_db_num_rows($result))
   {
     $row = pwg_db_fetch_assoc($result);
     return $row['data'];

mirlang commented Dec 21, 2016

no time to register in the forum, so i'm replying here: i tried rvelices' suggestion, which works for me :)

diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php
index e75f22e12..9d887355d 100644
--- a/include/functions_session.inc.php
+++ b/include/functions_session.inc.php
@@ -145,7 +145,7 @@ SELECT data
   WHERE id = \''.get_remote_addr_session_hash().$session_id.'\'
 ;';
   $result = pwg_query($query);
-  if ($result)
+  if (pwg_db_num_rows($result))
   {
     $row = pwg_db_fetch_assoc($result);
     return $row['data'];

@mcinternet

This comment has been minimized.

Show comment
Hide comment
@mcinternet

mcinternet Dec 25, 2016

That works for me - fine! Tanks!
No I have other two problems. During the error I created 2 new galeries. The have been created with errors and I cannot delete them.
2nd: in the user-account area is this error:
DataTables warning (table id = 'userList'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

Regards

mcinternet commented Dec 25, 2016

That works for me - fine! Tanks!
No I have other two problems. During the error I created 2 new galeries. The have been created with errors and I cannot delete them.
2nd: in the user-account area is this error:
DataTables warning (table id = 'userList'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.

Regards

@mcinternet

This comment has been minimized.

Show comment
Hide comment
@mcinternet

mcinternet Dec 25, 2016

AND: I cannot delete any galery

Regards

mcinternet commented Dec 25, 2016

AND: I cannot delete any galery

Regards

@mcinternet

This comment has been minimized.

Show comment
Hide comment
@mcinternet

mcinternet Dec 25, 2016

Now all seams to work!
My workaround: I deleted the DB-User and created a new one with all rights. Now it works!
best wishes
kind regards

mcinternet commented Dec 25, 2016

Now all seams to work!
My workaround: I deleted the DB-User and created a new one with all rights. Now it works!
best wishes
kind regards

@paulD1968

This comment has been minimized.

Show comment
Hide comment
@paulD1968

paulD1968 Mar 30, 2017

Had same issue after upgrading to 2.8.6
Applying @mirlang suggestion resolved my login issue.
Login was going in a loop not capturing the credentials on server and redirecting to home page.
All working now

paulD1968 commented Mar 30, 2017

Had same issue after upgrading to 2.8.6
Applying @mirlang suggestion resolved my login issue.
Login was going in a loop not capturing the credentials on server and redirecting to home page.
All working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment