Page 1 of 1

PHP configuration 'file not found'

Posted: Sat May 17, 2008 5:05 am
by mitchy1111
Hello,

I am just trying to setup PHP 5.2.6 to run with apache 2.0.63. I beleive I have added all the details I should have to the configuration files, but when I try to load a .php file through my browser it says file not found. Using win XP home sp2, IE7

e.g. my doc root is C:\webs\test. I have a file in this directory called index.php

if I enter http:\\localhost in my browser it says file not found.
if i enter http:\\localhost\index.php it says file not found

If I change the filename from index.php to index.htm, the browser displays an index with a list of the files in the document root (only index.htm at present but if I add more they are listed also). If I click on the file in the list it displays the htm file.

any ideas?

Thanks
Martin

Re: PHP configuration 'file not found'

Posted: Sat May 17, 2008 8:21 am
by Dutchben
It looks to me that Apache is not set up to parse php files yet. Make sure that in your httpd.conf file you have a line similar to this

LoadModule php5_module "<path to php>"
Which tells Apache to load php

and a line like this

AddType application/x-httpd-php .php
That tells Apache to parse .php files.

Otherwise Apache will not do anything when you request a .php file

Re: PHP configuration 'file not found'

Posted: Sat May 17, 2008 8:48 am
by VladSun
Dutchben wrote:It looks to me that Apache is not set up to parse php files yet. Make sure that in your httpd.conf file you have a line similar to this

LoadModule php5_module "<path to php>"
Which tells Apache to load php

and a line like this

AddType application/x-httpd-php .php
That tells Apache to parse .php files.

Otherwise Apache will not do anything when you request a .php file
I'm in doubt that would be the reason ...
@mitchy1111 - anything weird in your configs- i.e. custom rewrite_url rules, .htaccess files, etc. ?
Anything in your error logs?