Page 1 of 1

Testing php file in apache web server 2.2

Posted: Fri Feb 23, 2007 2:43 am
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.

Posted: Fri Feb 23, 2007 3:52 am
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

Testing php file in apache web server

Posted: Fri Feb 23, 2007 4:10 am
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.