.
Developer Spot - Web Development Tutorials
 


Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

Setting Up Apache, PHP & MySQL On Windows

By Amrit Hallan
2004-02-25
Reader Rating: 4 out of 5
Bookmark Print Version
Installing PHP

You can download the latest version of PHP (for Apache on Windows) from http://in.php.net/get/php-5.0.0b4-Win32.zip/from/a/mirror

After you have downloaded the file, extract it in a suitable folder. Let the path be c:\php.

You can run PHP for Windows in two ways: - a CGI executable (php.exe) and as an API module. I recommend using the API module and we'll configure PHP that way.

Once you have installed PHP in c:\php, locate a file there named php.ini. Copy this file to WINDOWS or WINNT folder.

If it is not already set, set extension_dir=c:\php in your php.ini file.

Now the part where PHP runs as an API module.

You need to locate two files in c:\php and they are php5apache.dll and php5ts.dll. Make sure these files here in this folder and in the same location.

Remember you installed Apache in c:\Program Files\Apache Group\Apache2? In Apache2 there is a folder "conf" and in this there is a file "httpd.conf". Open this file (I suggest you take a backup of this file before tinkering with it), and add the following lines somewhere:

LoadModule php5_module c:/php/php5apache2.dll
AddType application/x-httpd-php .php

If you want to use a PHP file (index.php) go to the line that contains:
DirectoryIndex index.html index.html.var index.shtml

Add index.php to it such that it appears as DirectoryIndex index.html index.html.var index.shtml index.php

That's it. You are ready to unleash PHP on your computer.



Article Pages:
Installing Apache
Installing PHP
Installing MySQL

 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:

» Protecting your PHP and HTML Source Code

» Publishing Newsletters Using PHP & MySQL - 4

» Publishing Newsletters Using PHP & MySQL - 3

» Publishing Newsletter Using PHP & MySQL - 2

» Publishing Newsletters Using PHP & MySQL

» Unix Webserver Crontab Basics



 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML