Bug #69136 [ReO->Fbk]: Session file empty when session-path on NFS mount
| From: | yohgaki@php.net | Date: | Sun, 31 Jan 2016 05:28:15 +0000 |
| Subject: | Bug #69136 [ReO->Fbk]: Session file empty when session-path on NFS mount | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198977@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69136&edit=1
ID: 69136
Updated by: yohgaki@php.net
Reported by: maggus dot staab at googlemail dot com
Summary: Session file empty when session-path on NFS mount
-Status: Re-Opened
+Status: Feedback
Type: Bug
Package: Session related
Operating System: Ubuntu 14 LTS
PHP Version: 5.6.6
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
I think users who have this problem is using user ID mapping or root squashing
http://manpages.ubuntu.com/manpages/intrepid/man5/exports.5.html
Make sure you are not loosing permission due to ID mapping. Since files handler does not anything
fancy for NFS/etc, if your PHP process has permission, it should not have permission issue.
Previous Comments:
------------------------------------------------------------------------
[2016-01-31 05:03:20] yohgaki@php.net
It seems this is some kind of permission issue, but
Re-Opened because reporter has this issue still.
Those who have this issue, please check session data file owner/group of processes trying to
write/read session data file. i.e. sess_{session_id} in session.save_path. It MUST match and it must
not be root for many setups.
------------------------------------------------------------------------
[2016-01-31 04:22:49] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
------------------------------------------------------------------------
[2016-01-26 18:19:19] sprunka at gmail dot com
Two separate vagrant VM instances.
1)
CentOS release 6.5 (Final)
PHP 5.6.17
Session save path is shared with host machine via vagrant default sync settings (not NFS, SMB,
RSync, or VirtualBox)
2)
CentOS release 6.7 (Final)
PHP 5.6.17 (Also tested with PHP 7 -- not sure which build, ame problem existed)
Session save path is shared with host machine via vagrant default sync settings (not NFS, SMB,
RSync, or VirtualBox) However, I have also tried this setup using the NFS sync type and it also
failed.
------------------------------------------------------------------------
[2016-01-17 07:39:23] yohgaki@php.net
Sorry for the delay, but I couldn't reproduce this on my Fedora23 and CentOS7.
"files" handler is working as it should.
Do you have this issue still? I think you have some kind of permission issue such as you are writing
session data by multiple user IDs. It wouldn't work with multiple user IDs or root ID.
------------------------------------------------------------------------
[2015-03-28 21:14:18] yohgaki@php.net
Locking under shared directory is unreliable. I guess this is the reason why.
Better approach to share sessions across servers is to use databases/caches like
memcached/mongodb/redis/etc.
Anyway, I may look into details...
------------------------------------------------------------------------
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=69136
--
Edit this bug report at https://bugs.php.net/bug.php?id=69136&edit=1