Testing php file in apache web server 2.2

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
soumitrar
Forum Newbie
Posts: 4
Joined: Thu Feb 22, 2007 11:09 am

Testing php file in apache web server 2.2

Post by soumitrar »

Hi All,

First of all thanks to Volka. Your suggestion bore fruit as now apache 2.2 is running with php5.

Now when i am testing sample test.php(it is placed under htdocs folder) in IE6 browser by http://localhost/test.php "HTTP_404 page/file not found" coming.

Have I misplaced the test.php file?

Any suggestion from experienced pros?

Thanks.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

soumitrar wrote:Then opened the Apache configuration file in C:\Program Files\Apache Group\Apache2.2\conf\httpd.conf and add the following three lines :
Open this httpd.conf again. There's a DocumentRoot entry in there. e.g.
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/srv/v/volker/htdocs"
A request for http://localhost/test.php would make apache process the file /srv/v/volker/htdocs/test.php
Same on a windows machine
DocumentRoot "E:/xampp/htdocs"
http://localhost/test.php => E:\xampp\htdocs\test.php
soumitrar
Forum Newbie
Posts: 4
Joined: Thu Feb 22, 2007 11:09 am

Testing php file in apache web server

Post by soumitrar »

Hi All,

I had tried default folder htdocs under apache2.2 folder and also my custom folder C:/www/htdocs. Changed the documentroot value accordingly. But in case of custom folder "HTTP-403 You are not authorised to view this pg" coming whereas in case of default folder "HTTP-404 File/pg not found" coming.

I can make out that some minor config adjustments required.

Any suggestion?

Thanks.
Post Reply