PHP
  Home arrow PHP arrow Page 2 - Installing PHP With IIS To Create A Discus...
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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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? 
PHP

Installing PHP With IIS To Create A Discussion Forum
By: Jayesh Jain
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2002-10-03

    Table of Contents:
  • Installing PHP With IIS To Create A Discussion Forum
  • Installing PHP
  • Creating The Access Database
  • Testing Our Forum
  • Conclusion

  • 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


    Installing PHP With IIS To Create A Discussion Forum - Installing PHP


    (Page 2 of 5 )

    Download the Windows binary for the latest version of PHP. Once you've downloaded it, unzip it io a C:\ and rename the folder to "php".

    Open the PHP.INI-DIST file from C:\PHP folder and locate the following line:

    ;cgi.force_redirect = 1

    We need to uncomment this line and change the setting to 0 as shown below to run PHP under IIS. Make the necessary changes and save the file as php.ini in your Windows folder (C:\WINNT on my computer):

    cgi.force_redirect = 0

    Configuring IIS for PHP
    I will assume that your IIS web server is up and running. Click Start -> Settings -> Control Panel -> Administrative Tools -> Internet Service Manager:



    Select the default web site, right click on it and select the properties option:



    Select the home directory tab and click on the configuration button. In the application configuration window, select app mappings and click on the add button.



    Enter the location of the executable as C:\PHP\PHP.EXE (or the location where you have installed PHP) and the extension as .php, as shown in the diagram above. Lastly, click on the OK button. This configures IIS to recognize and run PHP files using the PHP interpreter.

    Open your favorite text editor and create a text file. Type the following code:

    <?
    phpinfo();
    ?>


    phpinfo() is a PHP function which outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment, the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.

    Save this file as test.php in C:\INETPUB\WWWROOT (or your IIS Web Root Folder). Open you browser and visit http://localhost/test.php in the address bar.

    You should see a screen like this if PHP is running correctly:



    If the source code appears in the browser and not the output like that shown above, then PHP has not been properly installed or IIS does not recognizes PHP files. Double-check your settings in IIS as this is usually what stops the PHP files from being parsed.

    Now that PHP is setup, let's look at creating a simple forum using PHP and an Access database.

    More PHP Articles
    More By Jayesh Jain


     

    PHP ARTICLES

    - Making Usage Statistics in PHP
    - Installing PHP under Windows: Further Config...
    - File Version Management in PHP
    - Statistical View of Data in a Clustered Bar ...
    - Creating a Multi-File Upload Script in PHP
    - Executing Microsoft SQL Server Stored Proced...
    - Code 10x More Efficiently Using Data Access ...
    - A Few Tips for Speeding Up PHP Code
    - The Modular Web Page
    - Quick E-Commerce with PHP and PayPal
    - Regression Testing With JMeter
    - Building an Iterator with PHP
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek