Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

Installing PHP on Windows

By Michael J. Ross
2008-03-05


Testing PHP

If you check your Apache configuration file, httpd.conf, you will find that the PHP Setup Wizard made some changes, after creating a backup copy, httpd.conf.bak, in the same directory. Specifically, at the bottom of the file, it added the following:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL  
PHPIniDir "C:/_a/PHP/"
LoadModule php5_module "C:/_a/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

To make these Apache configuration changes take effect, restart your Apache Web server. This can be done in Windows services (Start > Settings > Control Panel > Administrative Tools > Services), or from the Apache program group menu (Start > All Programs > Apache HTTP Server 2.2 > Control Apache Server > Restart).

To verify that PHP is working fine with Apache, create a simple PHP script:

<?php  phpinfo();  ?>

Name it phpinfo.php and place it somewhere within your Apache document root (in our example, "C:\_a\Apache\htdocs"). Then run the script in a Web browser by going to the address http://localhost/phpinfo.php. You should see a Web page whose upper portion looks similar to the figure below.

Browse through the rest of the phpinfo() output. You'll find that it is a wealth of information about your Apache server, including environment variables, as well as PHP settings and global variables. Note that there is no mention of MySQL, because we have yet to connect MySQL to PHP.



Tutorial Pages:
» Introduction
» PHP Already Installed?
» Downloading PHP
» Testing PHP
» Adding MySQL
» MySQL Versions of DLLs
» XAMPP


Related Tutorials:
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» PHP Site Search Made Easy
» Installing and Configuring Drupal 6.1
» Desktop Application Development with PHP-GTK

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources