LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   apache not able to recognize php files (https://www.linuxquestions.org/questions/linux-newbie-8/apache-not-able-to-recognize-php-files-159283/)

phamtranquocvie 03-18-2004 01:53 AM

apache not able to recognize php files
 
Hello,
I just installed apache 2.0.48 and php4.3.x.x. After every thing is done, I try:
http://locahost/~user/test.php and it says,
"The file is of type application/x-httpd-php and Mozilla does not know how to handle this file type". Could you please tell me what is wrong.

I added This line: AddType application/x-httpd-php .php to httpd.conf already.

Thanks

iluvatar 03-18-2004 05:43 AM

Hello phamtranquocvie,

you should add this line to the 'mime.types' file:

application/x-httpd-php php

your httpd.conf should have these lines:

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c

greetz,
-= iluvatar =-

*** EDIT ***
or did they change the configuration files with apache 2 so much? this is for apache 1.3.27...

cascokid 10-06-2004 11:32 AM

"localhost" in http://localhost/~me/file.php
is not resolving to your ip number. Use
the actual IP number "127.0.0.1" or other.
http://127.0.0.1/~me/file.php will work OK.


All times are GMT -5. The time now is 03:07 AM.