Sunday, October 18, 2009

How to Install PHP 5.x on Windows XP Pro

Once you download the PHP zip file ( the Windows Binaries Zip Package), unzip it to c:\php.
To unzip using Windows default Extract Wizard
right click the zip file
select Extract All...
click Next
browse to My Computer > SYSTEM(C:)
with SYSTEM(C:) highlighted, click Make New Folder
enter php
press OK
in the ...extract to this directory. field you should see C:\php
press Next
then press Finish

To unzip using WinZip
right click the zip file
select Extract to...
select SYSTEM(C:) in the Folders/drives: window
with SYSTEM(C:) highlighted, click New Folder
enter php
press OK
in the Extract To: field you should see C:\php
press Extract
Add c:\php to your Environment Variables
right click 'My Computer' on desktop
select 'Properties' -> 'Advanced'
select 'Environment Variables' at the bottom of the screen
in 'System variables', scroll down to select 'Path' and press 'Edit'
add ;C:\php at the end of the 'Variable value:' field (variable values need to be separated by ;)
press Ok, press Ok, press Ok.

Add the .php extension
For IIS, add it to the Application Mappings.
Start -> Control Panel -> (Performance and Maintenance) ->Administrative Tools -> Internet Information Services
Expand your local computer by clicking the +
Right click on Web Sites
Select Properties
Select the Home Directory tab
Press the Configuration button on the lower right side of the screen
Press the Add button
Browse to C:\php
Change Files of type: at the bottom of the screen to Dynamic Link Libraries (*.dll)
Double click on php5isapi.dll or select php5isapi.dll and press Open
Enter .php in the Extension field (be sure to enter the '.' before the php)
Press OK
Press Apply
Press OK
Press OK

Close the Internet Information Services screen

For Abyss,
Declare the interpreter
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.
Select Scripting Parameters.
Check Enable Scripts Execution.
Press Add in the Interpreters table.
In the Interpreter field, press Browse..., go to the directory where you have installed PHP and click on php5isapi.dll .
Set Type to PHP Style.
Check Use the associated extensions to automatically update the Script Paths.
Press Add in the Associated Extensions table.
Enter php in the Extension field and press OK.
Press OK
Press Add in the Custom Environment Variables table.
Enter REDIRECT_STATUS (with no leading or trailing spaces) in the Name field and 200 in the Value field and press OK.
Press OK in the Scripting Parameters dialog.
Declare new index files
Select Index Files.
Press Add in the Index Files table.
Enter index.php in the File Name field and press OK.
Apply the modifications
Press Restart to restart the server.

For Apache, in the Apache install folder (C:\Program Files\Apache Group\Apache2 if the default was chosen):
open the conf folder
open the httpd.cnf file with notepad or some other text editor
Add:
LoadModule php5_module "C:/php/php5apache2.dll"
Addtype application/x-httpd-php .php
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
Search for PHPIniDir and set it to "C:/windows"
If PHPIniDir is not there, you can add it: PHPIniDir "C:/windows" or whatever your windows directory is.
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.
Copy Cinema Premiere's modified php.ini to your Windows directory which should be either C:\WINDOWS or C:WINNT depending on how you initially installed Windows XP Pro.
Cinema Premiere's modified php.ini can either be downloaded from here or
extracted from either the CinemaPremierePSTest.zip or the CinemaPremierePS.zip
right click either CinemaPremierePSTest.zip or CinemaPremierePS.zip
select Extract to...
in the Files area, select Files: and type in php.ini
in the Folders/drives window, expand SYSTEM (C:) by selecting the + in front of SYSTEM (C:)
select your Windows directory (either WINDOWS or WINNT)
select Extract

Thank you friends.
HEMA @ HELOISE

No comments:

Post a Comment