Installing PHP5.2.8 on Apache 2.2.11
Information
none
Operating system used
Windows Vista Home Premium SP 1
Software prerequisites
Apache 2.2.11
Procedure
- Download and unzip php-5.2.8-Win32.zip:
e.g.: C:\Tools\php-5.2.8-Win32
- Set System environment variable: PATH:..;c:\tools\php-5.2.8-Win32
- Copy file C:\Tools\php-5.2.8-Win32\php.ini-recommended
to
c:\WINDOWS\php.ini
- Edit file c:\WINDOWS\php.ini, change the following line:
doc_root = C:\mobilefish_web
extension_dir = "c:\tools\php-5.2.8-Win32\ext"
- Configure Apache by editing C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf:
-
In this example PHP will be run as a module in Apache and not as a CGI library.
Add the following line after all the LoadModule statements:
LoadModule php5_module "c:/tools/php-5.2.8-Win32/php5apache2_2.dll"
-
Add index.php in the DirectoryIndex directive:
DirectoryIndex index.html index.shtm index.htm index.php
-
Add the following line after all the AddType statements:
AddType application/x-httpd-php .php
View the updated httpd.conf file.
- Restart Apache.
- To test the PHP installation, create a file phpinfo.php with the following line:
<?php phpinfo(); ?>
Save this file into your Apache htdocs directory, e.g.: C:\mobilefish_web and type:
http://localhost/phpinfo.php
You should see something like this:
|