Re: browse a php file via internet, it returns a 404 error ,

From: Date: Wed, 09 Aug 2000 06:32:07 +0000
Subject: Re: browse a php file via internet, it returns a 404 error ,
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10851@lists.php.net to get a copy of this message
Hitomi Àû wrote:
Hello, I have installed the php-4.0.1pl2 , and now, whenever i try to browse a php file via internet, it returns a 404 error , why did they so ? and how can i fix it ?
404 is `Not Found'; are you sure you have the right URL? Did you install it as a CGI or as an Apache module? If you installed as an apache module (--with-apxs) then: Make sure that you have these lines in your httpd.conf, and make sure they are UNcommented:
LoadModule php4_module        /usr/lib/apache/modules/libphp4.so
AddType application/x-httpd-php .php .php3 .php4 .phtml (The path beside the first line above is probably going to be slightly different on your system.) And add .php .php3 .phtml .php4, etc., to your DirectoryIndex line. Something not unlike: DirectoryIndex index.html index.php index.php3 index.phtml index.shtml index.htm Double check to make sure you don't have duplicates of the above lines in your httpd.conf (Besides that, If you tried to load the php3 and php4 modules together (had them both uncommented) without enabling versioning at build time, I doubt the web server would restart.) And of course make sure you run: /path/to/apachectl stop Then do: /path/to/apachectl start Sometimes /path/to/apachectl restart won't cut it. That should be all; although, I don't know why failing to do any of the above would produce a 404. I'd imagine the worst that could happen is that PHP would be printed to your browser as plain text, or it would prompt you for download instead of being parsed. Make sure you are indeed editing the file that you're trying to reach in your browser, or make sure the files are in the right place. Brian

« previous php.general (#10851) next »