Apache
  Home arrow Apache arrow Page 3 - Creating a VAMP (Vista, Apache, MySQL, PHP) Setup
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

Creating a VAMP (Vista, Apache, MySQL, PHP) Setup
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 33
    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:
      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


    Creating a VAMP (Vista, Apache, MySQL, PHP) Setup - PHP
    ( Page 3 of 5 )

    Next up is the PHP installation. With Windows XP, we had reached the stage where PHP could install itself and configure itself to work with Apache automatically, meaning that we didn't need to worry about copying system files or DLLs all over the place or editing Apache's configuration file manually. Unfortunately, however, the current PHP installer does not have this ability with Vista, and although the installer will run okay, it does not include several important files. We can install PHP manually very easily though; first, create a new folder on your C: drive and call it php. Next, unpack the php-5.2.6-Win32.zip file to this new directory.

    We now need to update the Path environment variable. To do this open the Environment Variables dialog (Control Panel System Advanced system settings Environment Variables) and select the Path item in the System Variables section. Click the Edit button and add C:php; to the end of the existing text. You'll need to restart your machine for the change to take effect.

    At this point we need to create a php.ini file which tells PHP how to work correctly. There is a template in the C:php folder called php.ini-recommended. Open this in a text editor and scroll down to the Paths and Directories section (it should start on line 515). In this section there is a line that reads extension_dir = "./", you'll need to change this to extension_dir = "c:phpext" instead. Now save the file as php.ini. You'll need to restart your machine again at this point.

    Next we'll need to configure Apache to use the newly installed PHP. Reopen the httpd.conf Apache configuration file in your text editor and find the LoadModule directives (they are near the top of the file and begin on line 61). Below the last LoadModule directive add the following code block:

    ####### PHP Config ###########


    LoadModule php5_module "C:/php/php5apache2_2.dll"

    AddType application/x-httpd-php .php

    PHPIniDir "C:/php"


    ##############################


    This tells Apache to load the PHP module, adds the PHP file extension to the list of recognized mime-types and tells Apache where the php.ini configuration file resides. This is all we need to do. Make sure you save the httpd.conf file and restart Apache. To test that PHP is working correctly, create a new PHP file that has the following line of code in it:

    <?php phpinfo(); ?>

    Save this file in the C:apache site folder as phpinfo.php, and then in your browser address bar type: http://localhost/phpinfo.php. You should see this:

    This page lists loads of information concerning your PHP and Apache setup and is useful for checking that additional modules, such as MySQL, have installed correctly.



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