Bug #68015 [ReO->Csd]: Session does not report invalid uid for files save handler

From: Date: Fri, 09 Sep 2016 02:42:04 +0000
Subject: Bug #68015 [ReO->Csd]: Session does not report invalid uid for files save handler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203895@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68015&edit=1

 ID:                 68015
 Updated by:         yohgaki@php.net
 Reported by:        rmoisto at gmail dot com
 Summary:            Session does not report invalid uid for files save
                     handler
-Status:             Re-Opened
+Status:             Closed
 Type:               Bug
 Package:            Session related
 Operating System:   Ubuntu 12 x64
 PHP Version:        5.5.16
 Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=38553e853b65eb84f919e4f5c5b9e702f1842b62
Log: Fixed Bug #68015 Session does not report invalid uid for files save handler


Previous Comments:
------------------------------------------------------------------------
[2015-07-21 04:16:00] yohgaki@php.net

Raise more descriptive error for this. We have multiple bug reports for this behavior.

------------------------------------------------------------------------
[2015-07-21 02:54:51] yohgaki@php.net

File owner/group matters under shared environment. You must use non-root user/group if you would
like to tweak session variable from CLI.

------------------------------------------------------------------------
[2015-07-18 21:28:44] rmoisto at gmail dot com

I was testing this issue with PHP 7 beta.

What I found was PHP is checking for the owner of the session file. Obviously the reader/writer of
the file will be different for cli and fpm, therefore the issue.

Why is PHP doing this? File permissions don't even matter which makes no sense.

So I'm guessing all I need to do in order for a workaround is figure out how to start my
scripts as www-data.

On closer inspection the issue might be only with root user. My script is failing when I start it
with root every time except when the session file is owned by root.

------------------------------------------------------------------------
[2015-05-24 16:06:42] rmoisto at gmail dot com

I have

session.use_strict_mode = 0

in both cli and fpm versions of php.ini

I haven't touched it, it's the default value.
Tried my test code again and no luck. Tried changing 0 to Off but still the same.

------------------------------------------------------------------------
[2015-05-24 06:28:03] yohgaki@php.net

I think you have use_strict_mode = On in you php.ini
Look for "php -i" output if it is disabled.

session.use_strict_mode => Off => Off

Unless you disable it, new session ID is always created and used, rather than supplied session ID.
Feel free to reopen is you have issue with use_strict_mode=Off.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=68015


--
Edit this bug report at https://bugs.php.net/bug.php?id=68015&edit=1


Thread (11 messages)

« previous php.bugs (#203895) next »