Apache
  Home arrow Apache arrow Page 5 - 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? 
Google.com  
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 - Configuring MySql
    ( Page 5 of 5 )

    All that remains is to install and configure MySql.  This is probably the trickiest part and involves several steps for success.  First, download the MySql 4.1 installer for Windows from www.mysql.com and run it.  Accept all the defaults and use localhost for the server name.  A guest account will work, but will not be as secure as one with a password. 

    Once MySql is installed, go to the System control panel applet, select the Advanced tab and click the Environment Variables button.  Highlight the Path variable and select the Edit button.  Go the very end of the line and add ;C:\php then click OK. 

     

    You’ll need to restart the machine at this point.  Now go to the find files option in the start menu and do a search for libmysql.dll, then copy this file to your default PHP location (C:\php).  Now go back to the find files window, do a search for php.ini and open the file found in Notepad.  Scroll down until you find ;extension=php_mysql.dll and remove the semi-colon from the beginning of the line.  Save this file and restart Apache.  This should work fine, but if you get an error message saying that the libmysql.dll file could not be found, try copying this file to the Apache Bin folder as well.

    To test MySql, open Notepad and type the following:

    <?php

      $dbServer='localhost';
      $dbUser='root';
      $dbPass=' ';
      $dbName='test';
      $link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die
    ("Could not connect");
     
      print "Connected successfully<br>";
      mysql_select_db("$dbName") or die("Could not select database");
      print "Database selected successfully<br>";

    mysql_close($link);

    ?>

    This will simply attempt to connect to the server and select the test database that is created during the MySql installation.  Save this file as mysql.php in your web site folder then open a browser and type http://localhost/mysql.php.  You should see a web page displaying:

    Connected successfully
    Database selected successfully

    Your WAMP installation is now complete. You should now be all set to begin creating and testing complex database driven, dynamic web sites.  Please note that the set up described in this article is for closed, development environments only.  This configuration is in no way secure and should not be used for production.



     
     
    >>> 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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek