Sunday, February 1, 2009

Cannot install PHP 5.2.8 to XP IIS 5 ?

When trying to update my php from 5.1.4 to 5.2.8(php-5.2.8-win32-installer.msi) on my notebook running XP Pro with IIS 5.1 - ISAPI mode, the setup process keep generating an error pop-up dialog as follow:
"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 spending few hours of googling, found the following solution(Dicky-ProgrammingJoy blog):
  1. When installing the php-5.2.8-win32-installer.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.
  2. Select the "Don't Install web server" option. I tried to install "IIS ISAPI Module" and it didn't work for me.
  3. Once PHP is installed, restart your computer.
  4. (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
Up to this stages, I managed to get the php working properly in my XP Pro IIS 5.1
If you still have problem with the installation, please visit Dicky's Blog for further solutions.

No comments: