LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-05-2009, 10:04 AM   #1
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
Question PHP5 on apache prompts download php files


Hello, I recently installed php5 from source, on Red Hat.
I compiled to customs directories and config files so the old php4 could work too.

When I enable php5 (and disable php4), if I try to access a php file it prompts me to download the file.

When php5 is enabled and apache restarted, no error message are shown at bash.

The conf file looks like this:

LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
AddType application/x-httpd-php .php
DirectoryIndex index.php


I've tried using also :

AddHandler php5-script php
AddType text/html .php

but is doesn't works anyway....

Any help?
 
Old 06-05-2009, 10:32 AM   #2
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 242

Rep: Reputation: 18
check if the mod for php5 is enabled
 
Old 06-05-2009, 10:35 AM   #3
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by dlugasx View Post
check if the mod for php5 is enabled
I though that i just needed the LoadModule ...
where do I enable the mod??
[sorry I don't know too much about apache]
 
Old 06-07-2009, 09:40 AM   #4
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Question

which apache log file can I check for error messages related to this problem?
 
Old 06-07-2009, 01:26 PM   #5
mwkemo
Member
 
Registered: May 2009
Location: Croatia
Distribution: Debian
Posts: 31

Rep: Reputation: 16
You can try
a2enmode php5
/etc/init.d/apache2 restart

Log file is located in /var/log/apache2/error.log

EDIT:
Sorry this commands are for Debian, they dont work on Red Hat as far as i know.

Last edited by mwkemo; 06-07-2009 at 01:28 PM.
 
Old 06-07-2009, 05:41 PM   #6
AlexeyVP
LQ Newbie
 
Registered: Jun 2009
Location: Moscow, Russian Federation
Distribution: CentOS 5.3, Vista Ultimate x64
Posts: 2

Rep: Reputation: 0
What's your Apache version? In 1.3 you sometimes have to add one extra AddModule line to enable module.
 
Old 06-08-2009, 08:38 AM   #7
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlexeyVP View Post
What's your Apache version? In 1.3 you sometimes have to add one extra AddModule line to enable module.
Apache/2.0.52

I've checked the error file /var/log/httpd/error_log, I only found errors related to files not found (images, etc), but nothing about php....
 
  


Reply

Tags
apache, httpd, libphp5so, php, php5, redhat, rhel4


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
mysql/ php5.2.8 /apache 2.1.1 on centos. PHP not being pased!!! ratchie Linux - Newbie 2 12-28-2008 06:55 AM
PHP & Apache - php files not processing aolong Linux - General 1 12-17-2006 03:09 AM
Ubuntu Dapper + apache2 + php5 = download index.php dfwcomputer Ubuntu 1 10-23-2006 09:28 PM
Configuring Apache to process .php5 files usg Linux - Server 4 09-30-2006 11:06 AM
PHP5 on Apache saving .php files Skip-DMP Linux - Enterprise 2 08-03-2006 08:25 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration