Apache
  Home arrow Apache arrow Page 5 - Creating a VAMP (Vista, Apache, MySQL,...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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

Creating a VAMP (Vista, Apache, MySQL, PHP) Setup
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 10
    2008-05-20

    Table of Contents:
  • Creating a VAMP (Vista, Apache, MySQL, PHP) Setup
  • Installing and Configuring Apache
  • PHP
  • MySQL
  • Configuring

  • 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


    Creating a VAMP (Vista, Apache, MySQL, PHP) Setup - Configuring


    (Page 5 of 5 )

    Now we need to configure PHP to use MySQL. Reopen php.ini in your text editor and find the Dynamic Extensions section (line 628). There should be a list of the different extensions currently in the ext folder. Find the line that reads ;extension=php_mysql.dll and remove the semi-colon from the start of the line. Save the file and restart your computer.

    The output of the phpinfo() file will tell us whether PHP can see MySQL; just open up phpinfo.html in your browser again (requesting it properly from the server) and use "find on this page" to search for MySQL. You should see something like this:

    To really test it we can create a file that will attempt to read data from the table we created earlier. In a blank page in your text editor add the following code:

    <?php


    mysql_connect("localhost", "root", "yourMySQLpassword") or die(mysql_error());

    mysql_select_db("test") or die(mysql_error());

    $query = mysql_query("SELECT * FROM people") or die(mysql_error());


    while($data = mysql_fetch_array( $query )) {

    Print "<p>Name: ".$data['name'] ."<br>" ."Likes: ".$data['likes'] . " </p>";

    }

     

    ?>


    Save this as mysqltest.php in the apache site folder and request the file from the server. The results should be something like the following page:

    If you see the page correctly then everything works together as it should and everything is done. You can now enjoy the benefits of having your very own development web server. You should note however that this basic installation has not covered any security or optimization configuring, so you should absolutely not use this guide as a method to set up a live, publicly accessible web server.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · The Official PHP Installer handles the PHP and Apache configuration automatically,...
       · Unfortunately, the installer which works correctly and configures everything nicely...
       · You can save a lot of time and install Apache, PHP, MySQL together in just a few...
       · Absolutely, these can save hours. But where's the fun in using an automated...
       · As noted, the automated installer does not work with Vista.Must be done...
       · Thanks, I'm glad the article helped you get up and runningHappy coding =)
       · A reader of the Article - Pamela - kindly pointed out several typo's on page 3 of...
       · Hello I'm Doing This Article On Windows XP Home SP3(Upgrade), and I Can't Get MySQL...
       · Never tried the installation on SP3 so hard to say if this is a factorMost of...
       · While I wait on my registration email for this forum, I thought I would post a...
       · Apologies for the delay in response, I just got back off vacation =)Did you use...
       · This was my third attempt. After removing all evidence of the other attempts this...
       · I'm glad the article was able to help, thanks for reading =)
       · Hi,I have installed Apache 2.2, PHP 5 and MySQL 5 on Vista Ultimate. I have done...
       · Are you using the correct password/user in your PHP page?Can you post your mySql...
       · I created a testing table under the test db (which comes with mysql installation)...
       · Hmmmm, if things weren't configured right, mysql wouldn't even show in...
       · It works now. Thank you for your help very much.
       · Hello sir,I found this tutorial best for vamp than others. i m trying to install...
       · Did you try switching off your firewall, that seemed to help others (and I mean...
       · hello everybody, I have already switched off firewall. then also...
       · I tried for hours to install PHP so that it would work correctly with Apache &...
       · Hi Vinay, ...
       · Awesome! Glad the tutorial was able to help =) ...
       · Yes i have used that directory for extension...even i m facing same problem...plz...
       · Can you mail me your php.ini file so I can compare it to mine? danwellman @...
       · Finally!! You have no idea how good it was to find out that "Name: Dan Likes: House...
       · lol, awesome, well done for getting it going =)Thanks for the tips as well, it's...
     

       

    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-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway