PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
http://www.php.net/
C:\php\php.ini-dist file to C:\php\php.ini.
php.ini with a text editor and scroll down about halfway through the file
and look for doc_root, then change it to point to whatever your Apache DocumentRoot
is set to (e.g. doc_root = "C:\public_html").
extension_dir = "./" to the location of the
ext folder of your PHP installation
(e.g. extension_dir = "C:\php\ext").
session.save_path,
uncomment it (remove the ; mark) and change it to an existing folder.
session.save_path = "C:/%WinDir%/temp").
error_reporting = E_ALL & ~E_NOTICE to
error_reporting = E_ALL | E_NOTICE | E_STRICT.
Using text editor open C:\<APACHE_INSTALLATION_FOLDER>\conf\httpd.conf
(in the start-menu there should also be a Edit the Apache HTTP Server httpd.conf Configuration File
shortcut) and add the following lines to the end of file:
LoadModule php5_module "C:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php"
LoadModule php5_module "C:/php/php5apache2_2.dll" AddType application/x-httpd-php .php PHPIniDir "C:/php"
Start Apache (or restart it if it's already running). If it doesn't start or you get any error, call Apache Test Configuration shortcut to see the cause.
To test your PHP simply create a test.php file in your doc_root folder and
put these 3 lines in it:
<?php
phpinfo();
?>
When loaded in your browser - http://localhost/test.php, you should get a long list of PHP variables, settings, etc.