PHP is installed in CGI to Apache 2.0:
Insert the following instruction into the Apache httpd.conf configuration file to set up the CGI binaries:
scriptalias/php/"c:/php/"
AddType application/x-httpd-php. php
Action application/x-httpd-php "/php/php.exe"
PHP is installed in modular mode to Apache 2.0:
Move Php4ts.dll or Php5ts.dll to Winnt/system32 (Windows nt/2000) or Windows/system32 (Windows XP). Insert the following two lines into the httpd.conf.
; For PHP 4 does something like this:
LoadModule php4_module "C:/php/php4apache2.dll"
AddType application/x-httpd-php. php
; For PHP 5 does something like this:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php. php
Test Apache:
Open the browser and enter http://localhost/or HTTP://127.0.0.1/in the address bar, if you can appear in the Apache page "It works." , it means Apache is working properly.
To test your PHP settings:
Write a PHP page to enter the following code:
<title>
Hello
</title>
<body>
<?php echo "hello,php";?>
<P>PHP5 is work!</p>
</body>
Save this file as ***.php in the Apache Htdocs directory (you can change the directory in the http.conf file), open the browser, and enter http://localhost/***.php or http://in the address bar 127.0.0.1/***.php, if ***,php can display correctly, the PHP configuration is normal.