PHP v4.2.3 with IIS5 on Win2K platform

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hchinhwa
Forum Newbie
Posts: 6
Joined: Fri Dec 06, 2002 1:57 am

PHP v4.2.3 with IIS5 on Win2K platform

Post 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 8O
User avatar
riley
Forum Commoner
Posts: 45
Joined: Thu May 02, 2002 6:31 pm

Post 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.
hchinhwa
Forum Newbie
Posts: 6
Joined: Fri Dec 06, 2002 1:57 am

I installed PHP v4.2.3 using the Window Installer.

Post 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. :cry:
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Re: I installed PHP v4.2.3 using the Window Installer.

Post 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. :cry:
so you have it setup as cgi and also as ISAPI, maybe this is the problem. Do the file extensions overlap?
User avatar
riley
Forum Commoner
Posts: 45
Joined: Thu May 02, 2002 6:31 pm

Post 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.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

Use a free distribution of Linux. Problem solved.
hchinhwa
Forum Newbie
Posts: 6
Joined: Fri Dec 06, 2002 1:57 am

I wanted to use Linux but some of the codes are in ASP... :(

Post by hchinhwa »

Hi,

php4isapi.dll is placed in IIS>Filter folder while IIS>php.exe is placed in Application Mapping folder. Conflict?
Post Reply