ID:               35152
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mhaerry at c3om dot ch
-Status:           Open
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Linux RedHat EL 3
 PHP Version:      5.0.5
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-11-08 12:21:25] mhaerry at c3om dot ch

Description:
------------
Since around PHP 5.0.4 we are having a session save problem.

Most of the session files are stored correctly in seperate directories
for each virtual host. They have permission of 600 with the owner of
the running apache process. But there are from time to time session
files which are stored with Permission 000 like:

---
# find <pathtosessiondir> -perm 000 | xargs ls -lh
----------    1 nobody   4294967295        0 Nov  8 05:53
./<pathtosessiondir>/sess_dc3b60dc98b9ca7beba8f2afdf618df4
----------    1 nobody   4294967295       54 Nov  8 05:50
./<pathtosessiondir>/sess_122ad7d6c9c627cfa01201c4caf6520d
----------    1 nobody   4294967295       54 Nov  8 05:50
./<pathtosessiondir>/sess_1939034c40835c4946964eb0af25d14a
----------    1 nobody   4294967295       50 Nov  8 05:37
./<pathtosessiondir>/sess_353cecf3cd82bdb03092b0ceef89813c
----------    1 nobody   4294967295       54 Nov  8 05:51
./<pathtosessiondir>/sess_3cfab0c964ce99568520ca002dcdc015
----------    1 nobody   4294967295       54 Nov  8 05:50
./<pathtosessiondir>/sess_4ecf472d9c094634164ece1fea76bc8f
----------    1 nobody   4294967295       54 Nov  8 05:50
./<pathtosessiondir>/sess_56bd16f2d97c4705837d88b159df0de6
----------    1 nobody   4294967295       54 Nov  8 05:36
./<pathtosessiondir>/sess_61d36002c753af2301c361b3247775fa
----------    1 nobody   4294967295       54 Nov  8 05:34
./<pathtosessiondir>/sess_76e7794ad71b7c7ca30ee14d412d475b

etc.

---

so these session files can't be read anymore by php. it doesn't depend
on the application, we have this problem with every application from
time to time. and as it works sometimes and sometimes not within the
same application we don't think it has something to do with the umask
setting. so users can't login anymore etc. one solution is to delete
these files as root on the server (manually or in a script). the other
is to tell the users to delete the cookies and to restart their
browsers. but anyway these are only workarounds which won't fix the
problem.

the session dirs aren't in /tmp/ and are also not on a tmpfs
filesystem. it's on the normal ext3 filesystem.

any ideas why this can happen and what we can do against that?

Reproduce code:
---------------
standard usage of session functions:

session_start();
$_SESSION['foo'] = 'bar';
[...]

session_destroy(); //while logging out

Expected result:
----------------
expected session files with permission 600

like:

-rw-------    1 nobody   4294967295     215K Nov  8 06:08
sess_9b50bc95e2a138ca376ff0b111d6d5a0

Actual result:
--------------
session files with permission 000:

----------    1 nobody   4294967295       54 Nov  8 05:34
./<pathtosessiondir>/sess_76e7794ad71b7c7ca30ee14d412d475b


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


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

Reply via email to