Click to See Complete Forum and Search --> : Multiple installs of the SAME version of PHP on the one server


Brashquido
01-16-2005, 11:52 PM
Hi All,

I'm using a Windows 2003 Server with IIS 6, and have been using the Windows EasyPHP 4.3.8 installer for some time which has been working very solidly in fast_cgi mode. I have just installed Cacti 0.8.6c to start monitoring my systems using rddtool and have run across a problem with IIS not playing nice.

For Cacti to monitor devices you have to shedule a task to run that executes a php command via the command line which collects the data from all your devices and updates the graphs. However, when I do this these command line jobs get the following error;


PHP Warning: [Turck MMCache] Can not create shared memory area in Unknown on line 0


The reason this is happening is that IIS by default is set to cache ISAPI applications, and so is permanently hogging PHP to itself. This means that any application/command that requires PHP that isn't spawned from within IIS will get this error. It is easy enough to tell IIS not to cache ISAPI applications, but in the process of doing that you loose a good deal of performance.

My next thought was that if I was able to create two completely seperate PHP environments (one for IIS and one for everything else) on the same server, then the problem would be solved. However I do not know how to do this, or even if it is possible. One possible solution would be to install PHP 4 and PHP 5 and set one to work in CGI mode and the other in ISAPI mode as suggested in this thread (http://www.phpbuilder.com/board/showthread.php?s=&threadid=10291448). This isn't an ideal solution though as sooner or later all my PHP apps will require PHP 5. So my question is;

Does anyone know if it is possible to configure Windows 2003 Server with two PHP environments of the same version?

the_php_guy
01-19-2005, 11:04 AM
you can do this if one server runs php isapi and the other one runs cgi.

the php.ini for the php cgi in located in the php directory. and the php.ini for the php isapi is located in the windows directory, I have tried to run both php4 and php5 on the same pc at the same time. (one uses cgi and the other one uses isapi)