Page 1 of 1
PHP v4.2.3 with IIS5 on Win2K platform
Posted: Thu Dec 19, 2002 8:39 am
by hchinhwa
Hi,
I have this wierld problem. I have an index.php page and in it, there are 10 include statements. Each include statement represents a section in the index page. For example entertainment.php displays Entertainment section; game.php displays Games section.
The content of the index.php page is as followed:
<HTML><HEAD><TITLE>INDEX</TITLE></HEAD><BODY>
<?include("top.php");?>
<?include("entertainment.php");?>
<?include("game.php");?>
...
<?include("footer.php");?>
</BODY></HTML>
The funny thing is that the PHP server always goes down whenever there are many requests coming in. I am using a dual CPU with 256MB of RAM.
Is there a restriction to the number of include statement I can use?
Furthermore, I see PHP.EXE processes being created and destroyed in Task Manager.
Anyone has any ideas?
Thanks.
-Dave

Posted: Thu Dec 19, 2002 6:34 pm
by riley
Did you install php with the windows installer? I tried to use the isapi.dll version and it was doing the exact same thing (worked fine under test but under load failed repeatedly). I removed all of the references to using isapi and installed php with the windows installer and that seemed to fix everything.
I installed PHP v4.2.3 using the Window Installer.
Posted: Thu Dec 19, 2002 8:07 pm
by hchinhwa
Hi,
I used the window installer that comes with PHP 4.2.3 installer ([921Kb] - 6 September 2002).
However the funny thing is that whenever there are requests coming to the server, PHP.exe processes will always be created (viewed in Task Manager). Each PHP process is around 4-5MB in size. These processes vanished when the server served out index.php (I think).
I even tested index.php execution time and the server managed to complete the code interpreting with 0.05seconds.
I suspect that when there are more requests, more PHP processes are created which overload and down PHP server. However IIS is still functioning as I can view HTML and ASP files.
I am setting PHP.exe in IIS>Application Mapping and php4isapi.dll in IIS>ISAPI FILTERS.
What can go wrong? I have been investigating the problem over 2 weeks now.

Re: I installed PHP v4.2.3 using the Window Installer.
Posted: Fri Dec 20, 2002 8:58 am
by hedge
hchinhwa wrote:Hi,
I used the window installer that comes with PHP 4.2.3 installer ([921Kb] - 6 September 2002).
However the funny thing is that whenever there are requests coming to the server, PHP.exe processes will always be created (viewed in Task Manager). Each PHP process is around 4-5MB in size. These processes vanished when the server served out index.php (I think).
I even tested index.php execution time and the server managed to complete the code interpreting with 0.05seconds.
I suspect that when there are more requests, more PHP processes are created which overload and down PHP server. However IIS is still functioning as I can view HTML and ASP files.
I am setting PHP.exe in IIS>Application Mapping and php4isapi.dll in IIS>ISAPI FILTERS.
What can go wrong? I have been investigating the problem over 2 weeks now.

so you have it setup as cgi and also as ISAPI, maybe this is the problem. Do the file extensions overlap?
Posted: Fri Dec 20, 2002 6:13 pm
by riley
Yes I think thats the problem. You need only to run it as either cgi (exe) or Isapi not both. If this is a production server I would definitely go with the exe version. In the instructions is states that the ISAPI is not ready for production.
Remove every instance of the isapi module reference in the web server, remember that you need to remove it from all levels of the web server from the server name all the way down to each instance of a virtual directory.
It seemed that I had to remove these several times. They keep insisting on staying.
Posted: Sat Dec 21, 2002 4:36 pm
by evilcoder
Use a free distribution of Linux. Problem solved.
I wanted to use Linux but some of the codes are in ASP... :(
Posted: Sun Dec 22, 2002 9:01 pm
by hchinhwa
Hi,
php4isapi.dll is placed in IIS>Filter folder while IIS>php.exe is placed in Application Mapping folder. Conflict?