Ticket #283 (new defect)

Opened 10 months ago

WIN32 "Can not create shared memory " with multiple instance of php running with different privilege

Reported by: ikaos Assigned to: somebody
Priority: minor Milestone:
Component: eAccelerator Version: 0.9.5
Keywords: win32 privilege shm rights shared memory Cc:

Description

I meet a problem with two differents apache 1.3.33 + php 5.2.3 + eaccelerator 0.9.5.1 running on the same computer (win32 - Win XP Pro) - first apache run as a service - second apache run as an application two apache are running with different account name (and different privileges)

When starting the second apache (application) I got this message :

[eAccelerator] Can not create shared memory area in Unknown on line 0

There is a problem with CreateFileMapping?() (mm.c) that return error n°5 (Access Denied) It's seems to be not possible to access the same FileMapping? from two different accounts. CreateFileMapping? use a hard coded key (#define EACCELERATOR_MM_FILE "/tmp/eaccelerator" )

I solved this problem with few modification in the source code. I created a new setting for php.ini : eaccelerator.mm_path and I replaced : snprintf(mm_path, MAXPATHLEN, "%s.%s", EACCELERATOR_MM_FILE, sapi_module.name); by snprintf(mm_path, MAXPATHLEN, "%s", EAG(mm_path));

Same pb with php 4.4.X and eaccelerator 0.9.4