Easy!
Stop Apache. net stop apache in command or stop apache using the start menu.
-First, open the configuration file(httpd) - located in the 'conf' folder of Apache
-Search for DirectoryIndex then we will add little extra characters to that line.
-Follow the image below. just add index.php and index.htm after index.html
Next --
Go to the line or search for 'AddType application/x-tar .tgz'
below that line add the following:
-You can cut and paste them.
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
Now close this and save it.
Next download PHP -
Choose your download location & then....
Then unzip this file into the folder 'c:\php'
Note: When you unzip this file, it drops an extra folder.
C:\php\php-blah*. Move the contents of the second php folder to the first one then delete that extra php folder that was created.
Configure PHP
Go into folder 'c:\php' find file 'php.ini-dist' rename it to 'php.ini'
Open the file 'php.ini' using 'Notepad'
Under 'Search' click 'Find' or 'Edit' click 'Find' on Windows 2000 or press 'Ctrl+F'
then type this 'doc_root' - change to the directory of where your site is being held..mying is in c:\web example below:
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "c:\web"
Next change the extension_dir to the info below.
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php"
Moving along....
-Save and Close the file.
-Now, lets move this file to:
'php.ini' to c:\windows -- Win95/98/XP
To c:\winnt or c:\winnt40 -- WinNT/2000/XP
copy the file php4apache.dll from c:\php\sapi folder to the apache.exe folder
By default c:\Program Files\Apache Group\Apache
also copy the file php4ts.dll from c:\php to the same apache.exe folder
.....
Ok now for the test!
Open your fav text editor and paste this inside:
Today's date is: <? print (date ("M d, Y")); ?>
save it and call test.php
********
Load the test.php file to your web directory and turn your web server on...and you should be good to go!
Let me know.