Installation of PHP

by Suganya 2007-10-29 17:39:35

PHP Installation:

Before starting with the PHP Installation, you must first install Apache.

The procedure to install Apache is given in the below link:
http://hiox.org/index.php?id=99

If you have already installed the Apache you can proceed with the following steps:

Step1: Extract the PHP-4.3.7-Win32.zip file.

Step2: Copy the PHP folder and Paste it in the Program files i.e., D:/Program Files and rename it as php.

Step3: Now inside the php folder, copy the php.ini-dist file and paste it in windows folder i.e., D:/WINDOWS and rename it as php.ini. Open the same file and you may find a word as extension_dir, set the path for your php folder as
extension_dir = "D:/Program Files/php"
and save it.

Step4: Inside the php folder, you may see a file named as php4ts.dll. Copy the file and paste it inside the sapi folder which is inside the PHP folder.

Step5: In the sapi folder, there will be a file php4apache.dll. Now cut this file and paste it outside the sapi folder.

Step6: Now open the file install.txt, under Installing PHP for Apache as module, you may find three lines as

LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

which should be added to your httpd.conf. Copy those three lines and paste it in the Apache Group -> Apache -> conf -> httpd.conf at the end of the page.

Step7: After pasting, change the correct path of LoadModule between the quotes as "D:/Program Files/php/sapi/php4apache.dll".
Note: The path may vary depending upon the installation you have made. If the path goes wrong the php installation will fail.

Step8: At the top of the httpd.conf page, you must specify the directory where you will serve the documents, So you can see the word DocumentRoot pointed to some path, delete the existing path and set it according to your wish, i.e., set it as
DocumentRoot "E:/".

Step9: You should also give the same path in the Directory also, so you may find the directory path between the tags, delete the path give it as
<Directory "E:/">
This should be changed to whatever you set DocumentRoot to.

Step10: Save the file and restart the the Apache from Start -> Programs -> Apache HTTP Server -> Control Apache Server -> Restart.
Note: Whenever you make change in the Apache httpd.conf, you should restart the Apache to take effect your settings.

Step11: Now open your browser window and type localhost, you will be able to view the folders inside the directory you have pointed say E:folders will be listed.

Note: If you were not able to view it, you might have gone wrong somewhere. Start installing Again.

Tagged in:

1965
like
0
dislike
0
mail
flag

You must LOGIN to add comments