Bug #13320 Updated: shmget() fails if running two copies of php4 simultaniously as different users

From: Date: Mon, 07 Jan 2002 03:16:24 +0000
Subject: Bug #13320 Updated: shmget() fails if running two copies of php4 simultaniously as different users
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-76120@lists.php.net to get a copy of this message
ID: 13320
Updated by: yohgaki
Reported By: rawb@rawb.org
Old Status: Analyzed
Status: Assigned
Bug Type: Session related
Operating System: Linux/Debian/unstable
PHP Version: 4.0.6
Assigned To: yohgaki


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

[2001-12-19 22:42:19] yohgaki@php.net

This is expected. MM module will have problem you've mentioned.
This behavior will not be changed at least anytime soon...

--
Yasuo Ohgaki

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

[2001-09-15 13:05:38] rawb@rawb.org

Even with the session handler set to 'files', the mod_mm MINIT function
gets called, putting a session_mm.sem in /tmp with permissions set to
600. This stops anyone else from running php (such as from the command
line) at the same time.

I see three possible fixes (but I don't know if these would work,
otherwise I'd send you a patch):
1. Don't initialize the shared memory segment if the session save
handler is set to anything but 'mm'
2. If the shared memory system fails, set a flag instead of erroring
out, and have the rest of the shared memory system check this flag and
let them error out when they try to use the shared memory system
3. (almost a kludge) Have the shared memory system look at either the
$TMPDIR environment varible for where it should stick the segment, or
have some other environment varible / configuration option that someone
can set to put the session_mm.sem in someplace other than /tmp

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



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



Thread (5 messages)

« previous php.dev (#76120) next »