Home arrow PHP arrow Page 2 - Installing PHP With IIS To Create A Discussion Forum

Installing PHP With IIS To Create A Discussion Forum

PHP newbies: Install PHP on your Windows PC and create a Microsoft Access discussion forum in 10 minutes using this article from Jayesh.

Author Info:
By: Jayesh Jain
Rating: 4 stars4 stars4 stars4 stars4 stars / 13
October 03, 2002
  1. · Installing PHP With IIS To Create A Discussion Forum
  2. · Installing PHP
  3. · Creating The Access Database
  4. · Testing Our Forum
  5. · Conclusion

print this article

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() 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.
blog comments powered by Disqus

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- 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

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials