Installing WAMP
Introduction
This class provides a server using the LAMP (Linux Apache MySql and
PHP) environment. Many students also prefer to have a WAMP
installation (Windows Apache MySql and PHP) on their home machine to
practice with. Once installed, WAMP is a very nice production
environment, but installation is not for the faint-of-heart.
The following instructions outline how I recently installed WAMP on my
machine with Windows XP Home and no other web server on it. Try to
follow the examples exactly, and you should be able to install these
programs with few problems.
WARNING: Don't get creative with where you store things. Use exactly
the filenames and paths I suggest. If you must change something (EG
store to disk E: instead of C:) be sure to make that change
everywhere!
Installing Apache 2.0
Book has apache 1.3 Apache 2.0 has since come out. These
instructions assume apache 2.0
- Download Apache 2.0 for Windows.
- apache_2.0.52-win32-x86-no_ssl.msi
- Run installer
- When prompted, run as a service
- Open up browser point to localhost.
- If a web page shows, it's working
Important directory information
- apache root is
C:\Program Files\Apache Group\Apache2
- all your html goes in htdocs directory
- configuration files will be in conf directory
Installing PHP
Testing PHP
Configuring PHP
- Edit C:\windows\php.ini in a text editor.
- Find "register-globals" (line 373 in my file) set to "On"
- Find "extension=php_mysql.dll" (line 568) and remove the leading
semicolon.
- Restart apache and test
Installing MySQL (this can wait)
- Install from the zip file in default directory.
- mysql-4.0.18-win.zip
- Run mysqld first
- Run mysql from the command line to test.
- Later run mysql as a service
Installing PHPCoder (optional but very nice)
- Install PHP Coder
- r2p3setup.exe
- Edit preferences (view-preferences-PHP parsing)
- Run PHP Coder through local server
- Go to PHP Interpreter
- Set PHP executable to
C:\Program Files\PHP5\php.exe
- Go to Server Settings
- Set Web Server Document Root directory to
C:\Program Files\Apache Group\Apache2\htdocs
- Local URL should be left as
http://localhost
- Now you should be able to run PHP programs directly from PHP Coder
Other help from:
- http://www.webmasterworld.com/forum88/5212.htm
- apache install document (not so helpful)
- PHP install document (not so helpful)
My configuration files:
- These are the files from my Windows installation
- They will not work for you unless you have configured things
exactly as indicated in these notes.
- php.ini should be in
C:\Windows
directory
- httpd.conf should be in
C:\Program Files\Apache Group\Apache2\conf directory