Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-18-2004, 02:53 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 20

Rep: Reputation: 0
apache not able to recognize php files

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.

Old 03-18-2004, 06:43 AM   #2
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
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/
AddModule mod_php4.c

-= iluvatar =-

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

Last edited by iluvatar; 03-18-2004 at 06:46 AM.
Old 10-06-2004, 12:32 PM   #3
LQ Newbie
Registered: Oct 2004
Posts: 1

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache config files and php waynejkruse10 Linux - Software 8 12-05-2006 10:40 PM
Apache 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 11:25 AM
php files errors on apache - sometimes amimusa Debian 1 04-07-2005 01:52 PM
writing files on to apache with php djgerbavore Programming 12 11-15-2004 03:01 PM
running apache/php files limp Programming 3 11-07-2004 09:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration