Friends This post is the reply to my own post, if u r facing problems that i face in my first post of this forum just above. Then following is the solution. But its working fine with thats why i am posting wat i did to get it working. And to help other.
If u read this post first time then i request you to please read my 1st post and then if ur facing same problem then try this out.
After installing php,mysql,apache if u dont see the php script running then following is the solution for that
Step 1
Edit file httdc.config in the c:\program files\apache software Foundation\apache2.2\config\httpd.confg file
then insert the following statements
LoadModule php5_module "E:/program
files/php/php5apache2_2.dll" (here my installation drive is E:\ so
here is E:\ if u have C:\ then give that path)
AddType application/x-httpd-php .php
PHPIniDir "E:/program files/php/" (Give the address of the PHP
folder installed with)
Action application/x-httpd-php "/php/php-cgi.exe"
Wirite above three statements after the long list of LoadModule is
over add these three statements.
After this save the file and then restart the apache server. After
starting u will see in window below
"Apache 2.2/PHP5.2.6" means the php is configured with the
apache server.
Still u may get the same result after doing this. If it works fine ur
done else follow the Step 2
Step 2
First check the Error log file If at the end of the file u can see a
error
function not found in file "php_sam.dll"
if u get this file error then do following procedure
open PHP.ini file search for word "sam"
in the bottom of the file u will see
[PHP_SAM]
extension=php_sam.dll
when u see these two statements just comment them like as
below
#[PHP_SAM]
#extension=php_sam.dll
save the file and restart the apache server
After this run the code
<?php phpinfo(); ?>
after this in the browser use the http:\localhost and the ".php" file
of above code
hope ur code will work properly.
As the local host is the "C:\program\files\...\htdocs\" directory. If u
wish to change this directory
to some other directory and make that directory as local host for ur
project use following step.
Step 3
Open agian the file
E:\program files\apache software
foundation\apache2.2\config\httpd.confg file
Search the word "DocumentRoot"
DocumentRoot "E:/Program Files/Apache Software
Foundation/Apache2.2/htdocs"
u will see the path to this as ur current local "htdocs" dirctory
path (which is rt local host)
Change it to the folder u want to use as ur local host.(First make
that folder)
AS A PRECAUTION DONT DELTE THE ORIGINAL PATH JUST COMMENT
THEM, AS IF THIS DOESNT WORKS THEN
THOSE CAN BE UNCOMMENTED AND AND CAN BE USE AGAIN AS
NORMAL.
It will look like this
DocumentRoot "E:\MyFolder"
After this go further down and u will see commant
<Directory "<Directory "E:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
give the same path that u gave for the "DocumentRoot"
so it will look like this
<directory "E:\MyFolder">
Save the file and again start the apache server
Again run the phpinfo(); file in the browser with some html code to
recognize that
its new foder.
hope it works properly as its working fine with me.
HAPPY PROGRAMMING
Still if its not working then keep on cheking the error log file hope that might helpful for further problem.