Apache
  Home arrow Apache arrow Page 5 - Installing PHP under Windows
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

Installing PHP under Windows
By: Matthew Phillips
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 220
    2003-10-22

    Table of Contents:
  • Installing PHP under Windows
  • What is it?
  • Installation - Apache
  • Installation Cont'd - MySQL
  • Installation Cont'd - PHP
  • Testing It All

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    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’.

    More Apache Articles
    More By Matthew Phillips


       · My configuration is:Windows XP, Apache Web Server 2.2.9, PHP 5.2.6 and MySQL...
     

    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







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway