#Google Analytic Tracker

Pages

Jan 1, 2009

Running PHP on IIS 5 => "The specified module could not be found."

Ok, there are enough PHP installation guides on the web. Therefore I am not going to write a full guide and step for install the PHP server. Instead, I would like to share my experience when installing PHP with IIS. This is my first time to setup a PHP web sever on my computer, and I encountered the following 3 problems:

  1. When I run "php-5.2.8-win32-installer.msi", it failed to install : "There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor".
  2. After successfully installed PHP and the ISS ISAPI Module, I either got an Access Denied Problem
  3. In another installation attempt, I got this "The specified module could not be found" message.

Solution

  1. Without going into detail. This is how I solved the issue:
  2. When installing the msi: Install it in C:\PHP, DO NOT use the "Program File" as default and  DON'T select Web Sever.
    1. The reason is that IIS 5 doesn't like space character when mapping the PHP dll. Even if you put quotation for your path, you may still encounter "The specified module could not be found" message when opening a PHP page.
  3. Select the "Don't Install web server" option.  I tried to install "IIS ISAPI Module" and it didn't work for me.
  4. Once PHP is installed, restart your computer.
  5. (Here is where I am not sure why I was able to install the IIS ISAPI Module, but this is what I did)
    1. Download the PHP5 source code.
    2. Copy the php5isapi.dll to the PHP directory
    3. Manually setup the IIS - PHP mapping (Follow the instruction from this link)
    4. Run the msi installer again, run the Repair. It is suggested by the PHP install.txt file (find in C:\PHP\) that running the Repair may fix the issue when installing web server extension.
    5. Afterward, it may ask you to restart your computer.
    6. Run the msi installer one more time, click Change, and select IIS ISAPI Module this time.
    7. You should now able to install the IIS ISAPI module properly.
  6. Now, if you have try to open a php page, you may have an page access denied error.
  7. Go to the C:\PHP\ property
  8. Go to Security
  9. Click Add, and add "Internet Guest Account" and give read access for this user. This properly allows IIS web user access the php ISAPI module.

Conclusion

Since I am not exposing my web server to Internet, I am not worry security. I only use the web server to test some PHP pages.  You probably want to do some researches to see if you need to add the "Internet Guest Account" to the PHP installation directory.

4 comments:

Unknown said...

Thanks!! This helped out.. including the link. But you forgot to mention before you go to the link you would copy the zip version of the php code into the C:\PHP directory because when running the MSI installer, it doesn't include all the files required for this to work.

Anonymous said...

Great post .. after breaking my head for couple of days to make it work with iis 5.1, i came across your post and bingo, things are working now !! never knew installing under \program files\ will break things !

Unknown said...

You can use Program Files also using the 8.3 naming convention in Mappings Configuration Properties.

e.g.
For path
C:\Program Files\PHP\php5isapi.dll

Enter path
C:\Progra~1\PHP\php5isapi.dll

Anonymous said...

hhmm, I am still stuck. I continue to get, "The specified module could not be found"

Follow exact steps above and did not work.

I copied the *5iaspi.dll to system32 folder
Verified my path variable
added inetput\wwwroot to my php.ini file.

rebooted

and no luck...any other suggestions?