|Installing Apache 1.3.x & PHP 4.x under Windows
- Download Apache.
Go to http://httpd.apache.org/dist/httpd/binaries/win32/ and download the latest version of apache 1.3. If you don't have Windows ME, 2000 or XP click the note at the top for MSI Binary Distribution Packages. The latest *.no_src.msi file is the one you want.
- Once it is downloaded run the installer.
During installation i recomend changing the path from C:\Program Files\Apache Group to just C:\Program Files. The installed creates a directory called Apache with in this directory and this saves you one directory level. Of course you can install it elsewhere as you wish.
- On your start menu, there should now be an option for Apache. Inside it find the start option and make sure apache starts. Verify its running by going to http://localhost/ where you should see the "It worked" page. Go back to the Apache start menu option and shut it down. If you are running on windows 9x, and a DOS window is open for it, simply hit CTRL-C in that window to shut it down.
- Download PHP
Go to http://www.php.net/downloads.php and downlaod the PHP zip package from the windows Binaries section.
- Unzip php archive. The files in the archive are all in one directory called something like php-4.2.3-Win32, rename this to php4 .
- Copy the php4 directory to your C:\ so it becomes C:\php4
- From the php4 directory, copy the php4ts.dll file to your windows/system (for Windows 9x/Me) or winnt/system32 (for Windows 2000/XP)
- From the php4 directory copy the php.ini-dist to your windows or winnt directory as php.ini
- Go to c:\Program Files\Apache\Conf and open the httpd.conf file in a text editor.
- Find the "# Dynamic Shared Object (DSO) Support" section, it contains a bunch of LoadModule directives. At the end of this list add
LoadModule php4_module c:/php4/sapi/php4apache.dll
- Below that find the block of Add Module directives and add
AddType application/x-httpd-php .php
- Start Apache
- In your c:\Program Files\Apache\htdocs directory create a file called phpinfo.php with the following line
<?php phpinfo(); ?>
- With your web browser go to http://localhost/phpinfo.php and you should see the php info page. If you just see the one line of text you put in the file, something isn't configured correctly. Make sure your AddType line above is in the httpd.conf, and possibly stop and restart apache again.