LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , , , , , ,

Reply
 
Thread Tools
Old 06-05-2009, 11:04 AM   #1
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 4
Thanked: 0
Question PHP5 on apache prompts download php files


[Log in to get rid of this advertisement]
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?
macklein is offline  
Tag This Post , , , , ,
Reply With Quote
Old 06-05-2009, 11:32 AM   #2
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS 5.2 / Debian /
Posts: 124
Thanked: 1
check if the mod for php5 is enabled
dlugasx is offline     Reply With Quote
Old 06-05-2009, 11:35 AM   #3
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 4
Thanked: 0

Original Poster
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]
macklein is offline     Reply With Quote
Old 06-07-2009, 10:40 AM   #4
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 4
Thanked: 0

Original Poster
Question

which apache log file can I check for error messages related to this problem?
macklein is offline     Reply With Quote
Old 06-07-2009, 02:26 PM   #5
mwkemo
Member
 
Registered: May 2009
Location: Croatia
Distribution: Debian
Posts: 30
Thanked: 1
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 02:28 PM..
mwkemo is offline  
Tag This Post ,
Reply With Quote
Old 06-07-2009, 06:41 PM   #6
AlexeyVP
LQ Newbie
 
Registered: Jun 2009
Location: Moscow, Russian Federation
Distribution: CentOS 5.3, Vista Ultimate x64
Posts: 2
Thanked: 0
What's your Apache version? In 1.3 you sometimes have to add one extra AddModule line to enable module.
AlexeyVP is offline     Reply With Quote
Old 06-08-2009, 09:38 AM   #7
macklein
LQ Newbie
 
Registered: Jun 2009
Posts: 4
Thanked: 0

Original Poster
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....
macklein is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 07:55 AM
PHP & Apache - php files not processing aolong Linux - General 1 12-17-2006 04:09 AM
Ubuntu Dapper + apache2 + php5 = download index.php dfwcomputer Ubuntu 1 10-23-2006 10:28 PM
Configuring Apache to process .php5 files usg Linux - Server 4 09-30-2006 12:06 PM
PHP5 on Apache saving .php files Skip-DMP Linux - Enterprise 2 08-03-2006 09:25 AM


All times are GMT -5. The time now is 05: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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration