Issues Optimizing PHP 4.3x & IIS 6.0
I apologize for the length of this post but I felt it important to include as much detail as possible as this appears to be a complex issue.
ENVIRONMENTWindows 2003 Server SP1
IIS 6.0
PHP 4.3.11
MySQL 4.1
Zend Optimizer 3.0.1
eAccelerator 0.9.4
Xoops 2.0.14 / 2.0.15
ISSUE BACKGROUNDI have several PHP/MySQL sites that have always worked well such as PhpBB, ZenCart & 4images without any optimization.
Installing my first XOOPS site I discovered really poor load time
performance despite configuring the recommended cache and template settings in the XOOPS preferences.
First -I followed the instructions (below) for enabling IIS compression and things improved somewhat, particularly on the non XOOPS sites.
“Enabling IIS6 Native HTML Compression”
http://www.it-hq.org/modules/AMS/article.php?storyid=122Second –I followed the recommendation of “
Performance Tuning XOOPS in IIS” article
http://www.it-hq.org/modules/AMS/article.php?storyid=119The article said “…To try and help reduce this load you can install the Zend optimizer as well as a PHP accelerator such as eAccelerator (which is currently the only open source offering that maintains Windows binaries)….” [As of Sept 2005]
So, I installed Zend Optimizer again a very slight improvement, not significant. Zend Optimizer did show up in the phpinfo.php output.
However, Zend kept generating multiple Application Events ID 487 with the description:
“The description for Event ID ( 487 ) in Source ( Zend Optimizer ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Unable to view file mapping, Attempt to access invalid address.”
In doing google searches it appears this is a rather common issue, but no explanation or solution was found.
Third - I tried to install eAccelerator. I followed the instructions as best I understood it would not show up in the phpinfo.php output. For the life of me I could not get it to work. So I decided to move on and try the next item.
Fourth – Attempted to enable FastCGI in IIS and apply only to a XOOPS website.
I downloaded and migrated the files to my PHP installation:
http://www.caraveo.com/fastcgi/fastcgi-0.6.zip and unpack isapi_fcgi.dll to c:\php\isapi_fcgi.dll.
I manually created the following registry keys:
HKEY_LOCL_MACHINE\SOFTWARE\FASTCGI
IncrementServers REG_DWORD 0x00000002 (2)
MaxServers REG_DWORD 0x00000019 (25)
StartServers REG_DWORD 0x00000005 (5)
Timeout REG_DWORD 0x00000258 (600)
HKEY_LOCL_MACHINE\SOFTWARE\FASTCGI\.php
AppPath REG_SZ c:\php\php.exe
BindPath REG_SZ php-fcgi
I followed all the instructions on
http://phplens.com/phpeverywhere/fastcgi-php EXACLTY and in the site that I am trying it on I get a "No input file specified." error message. If I go back to the php4isapi.dll and it works again.
Fifth – I decided to try to uninstall Zend Optimizer and try it again. The XOOPS site came up as long I was using php4isapi.dll.
Only eAccelerator, not Zend, show up in the phpinfo.php output.
I decided to re-install Zend. Although it did not appear again in Phpinfo.php and eAccelerator still did, the sites did not work. On one site I got an access violation and on another nothing just a blank browser window that eventually timed out.
I uninstalled Zend again and that did not fix it. So I disabled eAccelerator in the php.ini and now all sites work again but I am back to my original issue XOOPS sites load extremely slow!
NOTESFor a variety of reasons I can not dump IIS and move to Apache. Long term I will add a Linux server but that is not possible right now so I have to make this work. Others say it can be done other say ditch IIS.
PHPINFO can be viewed here:
http://www.mcedigital.com/pub/test.phpThe most recent PHP.INI is posted here:
http://www.mcedigital.com/pub/php-ini.html Keep in mind that all Zend Optimizer and eAccelerator options have been remarked out.
OPEN QUESTIONSCould this be an IIS corruption issue? If I need to reinstall IIS how will that effect my 40+ websites and application pool configurations? I would certainly back up first but this is a scary proposition for me.
What the heck else could this be. I suspect a combination of a bunch of little things? I hope.
I would be VERY GRATEFUL to anyone willing to help resolve this issue. This is keeping me from developing and hosting XOOPS sites.