LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-13-2007, 07:45 PM   #1
Bartoldo
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Rep: Reputation: 0
RHLE 4 Apache2 doesn't load php4 files


Hi,

I'm running a LAMB in my RHLE 4 box with Apache 2.0.52-19, php 4.3.9 but php doesn't load php files. What I get instead is:

You have chosen to open

php file

which is a: application/x-httpd-php.


php is running and the httpd.conf has uncommented all the lines to make apache to parse php files.

Any idea?

Thanks for your help.
 
Old 09-14-2007, 01:31 AM   #2
Scroggs79
LQ Newbie
 
Registered: Feb 2006
Location: California
Distribution: Mandriva
Posts: 15

Rep: Reputation: 0
You must have php compiled into Apache or the mod_php module.
I have mod_php5.so in /etc/httpd/extramodules/
 
Old 09-14-2007, 09:51 AM   #3
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
you need sth like this in httpd.conf to tell apache what to do with php files:
AddType application/x-httpd-php .php
 
Old 09-15-2007, 08:17 AM   #4
Bartoldo
LQ Newbie
 
Registered: Nov 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Hi,

thanks for your help, but I still can't fix the problem.

I have that line already in my apache conf file:


AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php. php

and this one:

Include conf.d/*.conf

the last line should make apache to look for the php.conf file which is in the directory conf.d:

LoadModule php4_module modules/libphp4.so

AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php. php

DirectoryIndex index.php

this is the content of php.conf and libphp4.so is in the modules directory.

So, everything seems to be OK but it doesn't work. php is running, I can use it from the command line just typing php but Apache doesn't load php files.

Last edited by Bartoldo; 09-15-2007 at 08:18 AM. Reason: spelling mistake
 
  


Reply



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
Apache2 won't load index.php files foucault Linux - Software 11 03-20-2010 09:08 PM
phpbb, apache2, php4 Odins_Son Linux - Software 2 12-23-2004 02:24 AM
apache2 + php4 atheist Linux - Software 6 10-25-2004 03:12 PM
a problem with php4 under apache2 aswanjaguar Linux - Software 4 09-22-2004 03:15 PM
php4 with apache2? the debian way, how? Tisch Debian 4 08-19-2004 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:13 AM.

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