Fork me on GitHub
Menu
News
Web Development
UNIX
Physics
Misc
This Website
message icon wishlist icon

amadeus.maclab.org

Resources for web developers and other stuff™
13:34 12/07/2005

Installing and Configuring Apache & PHP for Windows 2000/XP with gettext support

Background

If you have a production server with an older version of apache/php you might want to mimic their setup.

You need a phpinfo() file on the production server to glean the versions of apache + php.

For this article I used apache 1.3.23 with php 4.1.2 on a Windows development PC.

I also describe how to include gettext support on your local machine.

Resources

Here are the three configuration files (use these AFTER you've read this page):

httpd.conf
php.ini

Download the correct versions of software you check from a phpinfo() on the production server.

php-4.1.2-Win32.zip
apache_1.3.23-win32-x86-no_src.msi

After this you can see my other article on how to install Apache CGI PHP MySQL on Windows for more information (less graphical).

Method

Install Apache

snapshot

Configure Apache

You need to set the correct directory to serve files from

snapshot

snapshot

snapshot

snapshot

snapshot

Add php support to apache

At the end of httpd.conf add:

snapshot

Install PHP

Unzip to c:\php

Copy c:\php\php4ts.dll to c:\php\sapi:

snapshot

Copy the two files in "dlls" to c:\windows:

snapshot

Copy c:\php\php.ini-recommended to c:\windows\php.ini

This is your php configuration file.

Configure PHP

Open c:\windows\php.ini and add the path to extensions:

snapshot

Enable the extensions we need in php.ini:

snapshot

Test

Make a test file in c:\www:

snapshot

Restart the apache service and visit that page, making sure the extensions have loaded.

You should now have a working version of your production server (with gettext) which will help you a lot in not using "new features" of later php version found in many automatic installers.

Copyright © 2002-2017 message icon Amadeus Stevenson, Photo credit: Klaus Post
XHTML CSS
wishlist icon