Home arrow Apache arrow Page 5 - Installing PHP under Windows
APACHE

Installing PHP under Windows


Not a Linux fan? Looking for a hassle-free way of setting up a PHP environment on your Windows box? Read as Matthew guides us through the process of installing Apache, MySQL and PHP on a Windows based machine, otherwise known as WAMP.

Author Info:
By: Matthew Phillips
Rating: 5 stars5 stars5 stars5 stars5 stars / 271
October 22, 2003
TABLE OF CONTENTS:
  1. · Installing PHP under Windows
  2. · What is it?
  3. · Installation - Apache
  4. · Installation Cont'd - MySQL
  5. · Installation Cont'd - PHP
  6. · Testing It All

print this article
SEARCH DEVARTICLES

Installing PHP under Windows - Installation Cont'd - PHP
(Page 5 of 6 )

Create the directory C:\php and extract all files in the PHP ZIP file here. You will now need to copy some files to your Apache Directory (C:\Program Files\Apache Group\Apache2\).

Copy the following files:

C:\php\php4ts.dll
C:\php\sapi\php4apache2.dll
C:\php\php.ini-recommended

Rename ‘php.ini-recommended’ to ‘php.ini’ and open it in notepad.

Search for 'doc_root'  until you find the line:

doc_root =

Change this line to:

doc_root = C:\Program Files\Apache Group\Apache2\htdocs

Open the file httpd.conf in notepad. Httpd.conf can be found in: C:\Program Files\Apache Group\Apache2\conf\; add the following lines to the end of the file:

   LoadModule php4_module php4apache2.dll
   AddType application/x-httpd-php .php

Congratulations you have just installed PHP on your computer! But don’t start the part yet, test to make sure it works!

Test PHP

To test that PHP has been correctly installed click ‘Start > All Programs > Apache > Configuration > Test Configuration’. A console window should show briefly then disappear, if this happens then everything is ok, it if stays, take note of any errors and makes sure you haven’t missed any of the instructions above.

Restart Apache

For all the changes to take effect, and Apache to recognize PHP, Apache must be restarted. To do this click ‘Start > All Programs > Apache > Control > Restart’.


blog comments powered by Disqus
APACHE ARTICLES

- Programmatically Manipulating Microsoft Exce...
- Installing PHP under Windows
- Compressing Web Content with mod_gzip and mo...
- Compressing Web Output Using mod_deflate and...
- Setting Up Apache 2.0.45 to Parse PHP Pages
- Custom Error 404 Documents with PHP
- Using Apache and PHP on Mac OS X
- ASP: Active Sessions, Active Logins and Tota...
- Working With Oracle on Windows: Part 1
- The Quick-n-Dirty Guide to Setting Up Apache...
- Installing Apache With SSL: The Complete Gui...
- 7 Powerful .htaccess Customization Tips
- Trap And Get Notified: A Practical Solution ...
- One Way To Use Server Side Includes
- Using ForceType For Nicer Page URLs

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials