| Installing and Configuring PHP
- Open up your php-4.3.0-Win32.zip file
where you put your download of PHP (Files folder on the desktop
in my case).
- Extract the zip file to E:\Inet.
Now take a look at E:\Inet and you will find a php-4.3.0-Win32
folder there. Rename the folder to PHP.
- Inside the PHP folder you will see a php.ini-recommended
file.
Rename it to php.ini
- Open the php.ini file using Notepad. Search for doc_root,
just about on line 431 (Edit/Go To... or hotkey Ctrl+G).
Locate where it says doc_root =
Make it doc_root = "e:\inet\www"
- 7 lines below, you should see extension_dir
= ./
Make it extension_dir = "e:\inet\php"
- Final step, in your PHP folder, cut the php4ts.dll
file and paste it to your Windows folder.
(Typically C:\Windows for XP, C:\Winnt for 2000)
Configuring Apache for PHP
We have PHP installed and configured now. But Apache doesn't know
yet what to do when it comes accross a file with a php extension.
So, now we have to tell Apache what to do when it sees anything
php.
For this, we need to open up our infamous httpd.conf
file. Incase you forgot already, it should be under E:\Inet\Apache2\conf.
Or you can find it under Configure Apache Server in the
Apache program group in your Start menu.
- Having opened up httpd.conf file in Notepad, at about line 742,
find the line where it says: AddType application/x-tar
.tgz
- Copy & Paste the following underneath it:
- PHP should be running now. But you just never know unless you
test it.
Open up notepad and paste the following:
<?
phpinfo();
?>
Save the file under your WWW folder
as test_php.php
Or if you are just plain old lazy, well, then
right-click here and Save-As
to your WWW folder.
- If you have Apache running, left click on the Apache
monitor icon on your system tray. Choose restart.
- Test your configuration: http://localhost/test_php.php
- Is this what you see?

Yes? Continue on my friend.
No? Oops, you have done something wrong obviously. Go back to
the beginning and check step-by-step, the most common error is
most likely capitalizing (E:\Inet\WWW for example, instead of
e:\inet\www).
I just have to assume it worked and continue on. So much output
for so little text aye? What you see there is every little detail
about your PHP installation on your server.
Well, congratulations, the ever-so-godly PHP is installed and your
webserver is configured to parse it. You can now go to hotscripts.com
and browse all them amazing PHP scripts.
But believe me, it would be so much better if you super-powered
your PHP with MySQL. Continue on for installing MySQL.
Return to Step 2 -
Proceed to Step 4 |