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:
- 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".
- After successfully installed PHP and the ISS ISAPI Module, I either got an Access Denied Problem
- In another installation attempt, I got this "The specified module could not be found" message.
Solution
- Without going into detail. This is how I solved the issue:
- When installing the msi: Install it in C:\PHP, DO NOT use the "Program File" as default and DON'T select Web Sever.
- 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.
- Select the "Don't Install web server" option. I tried to install "IIS ISAPI Module" and it didn't work for me.
- Once PHP is installed, restart your computer.
- (Here is where I am not sure why I was able to install the IIS ISAPI Module, but this is what I did)
- Download the PHP5 source code.
- Copy the php5isapi.dll to the PHP directory
- Manually setup the IIS - PHP mapping (Follow the instruction from this link)
- 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.
- Afterward, it may ask you to restart your computer.
- Run the msi installer one more time, click Change, and select IIS ISAPI Module this time.
- You should now able to install the IIS ISAPI module properly.
- Now, if you have try to open a php page, you may have an page access denied error.
- Go to the C:\PHP\ property
- Go to Security
- 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:
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.
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 !
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
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?
Post a Comment