Bug #13320: shmget() fails if running two copies of php4 simultaniously as different users
| From: | rawb at rawb dot org | Date: | Sat, 15 Sep 2001 17:05:38 +0000 |
| Subject: | Bug #13320: shmget() fails if running two copies of php4 simultaniously as different users | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66012@lists.php.net to get a copy of this message | ||
From: rawb@rawb.org
Operating system: Linux/Debian/unstable
PHP version: 4.0.6
PHP Bug Type: Session related
Bug description: shmget() fails if running two copies of php4 simultaniously as different users
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 bug report at: http://bugs.php.net/?id=13320&edit=1