Apache
  Home arrow Apache arrow Page 4 - Installing and Configuring Apache 2 on a Windows XP Machine
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 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 and Configuring Apache 2 on a Windows XP Machine
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 141
    2005-09-28


    Table of Contents:
  • Installing and Configuring Apache 2 on a Windows XP Machine
  • Getting Started
  • Configuring
  • Getting PHP Working
  • Configuring MySql

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Installing and Configuring Apache 2 on a Windows XP Machine - Getting PHP Working
    ( Page 4 of 5 )

     

    To get PHP working, just visit www.php.net and download the PHP 5.0.4 installer.  Run the installer and keep all of the defaults.  That’s it; PHP is installed as a CGI application.  All you need to do now is tell Apache that PHP is there.  Open the httpd.conf file from the start menu and find the DirectoryIndex directive again.  Add Index.php before index.html, because you’ll want the server to look for an index.php file before it looks for any other file type.

    Now scroll down to the ScriptAlias directive and add the following line of code below the existing directive:

    ScriptAlias /php/ "c:/php/"

    The path is the path to the default PHP folder, which is generated during the installation of PHP.  Change it if you chose to install to a different location.  Next you’ll need to scroll quite a way down until you come to the AddType directives and add the following line of code directly beneath the last one:

    AddType application/x-httpd-php .php

    This will register files ending with a PHP extension to the list of available media types.  Finally, scroll down to the Actions section.  This section is commented out completely, so just add the following directive to a new line below the comments.  Make sure there is not a hash symbol at the start of the line:

    Action application/x-httpd-php "/php/php-cgi.exe"

    This will tell Apache how to process the media type that you’ve just registered.  Now save the httpd.conf file and restart Apache.  The customary way to test a PHP installation is to make use of the phpinfo() function, which displays information about PHP and your system.  In Notepad, type the following line of code, then save the file as index.php:

    <?phpinfo()?>

    Open a browser instance and again type http://localhost.  You should now see the results of the phpinfo() function.  PHP has now been successfully installed and Apache configured correctly for its use.

     



     
     
    >>> More Apache Articles          >>> More By Dan Wellman
     

       

    APACHE ARTICLES

    - Creating a VAMP (Vista, Apache, MySQL, PHP) ...
    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT