Home of Cinema Premiere Deluxe Movie Manager - Import, organize, search, sort and play your movies on all types of media.
Home | Previous | Next

How to Install PHP 5.x on Windows XP Pro


Once you download the PHP Windows Binaries Zip Package (For Windows XP Pro, I used the Win32-VC9-x86 non thread safe version of the zip file.), unzip it to c:\php. (If you had an older version of php installed rename that directory to c:\php-old then create a new c:\php to unzip the files to.

The newer versions of PHP do not include php5isapi.dll. They use the FastCGI php. I have only tried installing and testing this using IIS 5.1 on XP Pro.

  1. First you will need to have the FastCGI for IIS extension installed. You can download it from http://www.iis.net/expand/FastCGI. I chose to download and install the x86 version for FastCGI 1.5 for IIS 6 even though my version of IIS is 5.1. Once you start the install it will say that it is also for 5.1.
  2. I followed the instructions for "Manually Configuring FastCGI Extension to Work with PHP" in this document, http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/ to configure my system to use FastCGI.
  3. Note: To launch inetmgr.exe, you can either
    1. go to Start > Rung and type inetmgr.exe in the Open field and press OK or
    2. go to Start -> Control Panel -> (Performance and Maintenance) ->Administrative Tools -> Internet Information Services
  4. The newer version of php does not have an initial php.ini although it does have a development and production .ini that you can rename to a php.ini. I started with the php.ini-production, renamed it to php.ini and modified it as they suggested in the above doc.
  5. Of course, it was not as easy as that. I kept getting all different kinds of problems when I tried running the Cinema Premiere Personal Server. For a while I was getting Page Not Found and then I made some other changes and then it started trying to download the .php files instead of running them. So I went back and made sure I installed php correctly and researched these problems with php on the internet. I previously had an older version of php installed that ran php5isapi.dll which caused additional issues. I tried so many different things until I finally got it working. This is what I did.
    1. I went back into Internet Information Services (inetmgr.exe)
      • Double click the machine icon for the local computer.
        • Right click on "Web Sites" and pick "Properties."
        • Click the "Home Directory" tab. 
        • Click the "Configuration…" button.
        • I made sure that .php had the executable panth set to fcgiext.dll located in %WINDIR%\system32\inetsrv.  
      • Then I went back to the Internet Information Services main window under the local computer I double clicked or opened the Web Sites folder.
        • Right click on "Default Web Site" and pick "Properties."
        • Click the "Home Directory" tab. 
        • Click the "Configuration…" button.
        • I made sure that .php had the executable panth set to fcgiext.dll located in %WINDIR%\system32\inetsrv. It was not. It was set to php5isapi.dll so I changed it.
    2. Since I still had problems I modified the php.ini some more. I tried so many different things in the php.ini that I don't remember which fields I ended up setting to what, but this is the php.ini that finally worked. Download php.ini It must be in your php directory.
    3. I also tried many different settings in the fcgiext.ini located in %WINDIR%\system32\inetsrv until I finally got it to work. Download fcgiext.ini
    4. Also, just to be sure I rebooted my PC after making these changes. You may be able to just stop and start the services, but I wanted to make sure everything was reset.

To Install older version of PHP

  1. To unzip using Windows default Extract Wizard
    1. right click the zip file
    2. select Extract All...
    3. click Next
    4. browse to My Computer > SYSTEM(C:)
    5. with SYSTEM(C:) highlighted, click Make New Folder
    6. enter php
    7. press OK
    8. in the ...extract to this directory. field you should see C:\php
    9. press Next
    10. then press Finish
  2. To unzip using WinZip
    1. right click the zip file
    2. select Extract to...
    3. select SYSTEM(C:) in the Folders/drives: window
    4. with SYSTEM(C:) highlighted, click New Folder
    5. enter php
    6. press OK
    7. in the Extract To: field you should see C:\php
    8. press Extract
  3. Add c:\php to your Environment Variables
    1. right click 'My Computer' on desktop
    2. select 'Properties' -> 'Advanced'
    3. select 'Environment Variables' at the bottom of the screen
    4. in 'System variables', scroll down to select 'Path' and press 'Edit'
    5. add ;C:\php at the end of the 'Variable value:' field (variable values need to be separated by ;)
    6. press Ok, press Ok, press Ok
Add the .php extension
  1. For IIS, add it to the Application Mappings.
    1. Start -> Control Panel -> (Performance and Maintenance) ->Administrative Tools -> Internet Information Services
    2. Expand your local computer by clicking the +
    3. Right click on Web Sites
    4. Select Properties
    5. Select the Home Directory tab
    6. Press the Configuration button on the lower right side of the screen
    7. Press the Add button
    8. Browse to C:\php
    9. Change Files of type: at the bottom of the screen to Dynamic Link Libraries (*.dll)
    10. Double click on php5isapi.dll or select php5isapi.dll and press Open
    11. Enter .php in the Extension field (be sure to enter the '.' before the php)
    12. Press OK
    13. Press Apply
    14. Press OK
    15. Press OK
    16. Close the Internet Information Services screen
  2. For Abyss,
    1. Declare the interpreter
      1. Open Abyss Web Server's console. In the Hosts table, press Configure in the row corresponding to the host to which you want to add PHP support.
      2. Select Scripting Parameters.
      3. Check Enable Scripts Execution.
      4. Press Add in the Interpreters table.
      5. In the Interpreter field, press Browse..., go to the directory where you have installed PHP and click on php5isapi.dll .
      6. Set Type to PHP Style.
      7. Check Use the associated extensions to automatically update the Script Paths.
      8. Press Add in the Associated Extensions table.
      9. Enter php in the Extension field and press OK.
      10. Press OK
      11. Press Add in the Custom Environment Variables table.
      12. Enter REDIRECT_STATUS (with no leading or trailing spaces) in the Name field and 200 in the Value field and press OK.
      13. Press OK in the Scripting Parameters dialog.
    2. Declare new index files
      1. Select Index Files.
      2. Press Add in the Index Files table.
      3. Enter index.php in the File Name field and press OK.
    3. Apply the modifications
      1. Press Restart to restart the server.
  3. For Apache, in the Apache install folder (C:\Program Files\Apache Group\Apache2 if the default was chosen):
    1. open the conf folder
    2. open the httpd.cnf file with notepad or some other text editor
    3. Add:
      1. LoadModule php5_module "C:/php/php5apache2.dll"
      2. Addtype application/x-httpd-php .php
    4. You may not need to do this step, but if you have a problem running php files you may need to come back and configure the path to php.ini
      1. Search for PHPIniDir and set it to "C:/windows"
      2. If PHPIniDir is not there, you can add it: PHPIniDir "C:/windows" or whatever your windows directory is.
    5. Save the file and restart the Apache server by clicking on the Apache icon in the system tray, moving your cursor over Apache2 and selecting Restart.

Previous | Next | Top