Linux - Server This forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
06-05-2009, 10:04 AM
#1
LQ Newbie
Registered: Jun 2009
Posts: 6
Rep:
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?
06-05-2009, 10:32 AM
#2
Member
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 224
Rep:
check if the mod for php5 is enabled
06-05-2009, 10:35 AM
#3
LQ Newbie
Registered: Jun 2009
Posts: 6
Original Poster
Rep:
Quote:
Originally Posted by
dlugasx
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]
06-07-2009, 09:40 AM
#4
LQ Newbie
Registered: Jun 2009
Posts: 6
Original Poster
Rep:
which apache log file can I check for error messages related to this problem?
06-07-2009, 01:26 PM
#5
Member
Registered: May 2009
Location: Croatia
Distribution: Debian
Posts: 31
Rep:
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 .
06-07-2009, 05:41 PM
#6
LQ Newbie
Registered: Jun 2009
Location: Moscow, Russian Federation
Distribution: CentOS 5.3, Vista Ultimate x64
Posts: 2
Rep:
What's your Apache version? In 1.3 you sometimes have to add one extra AddModule line to enable module.
06-08-2009, 08:38 AM
#7
LQ Newbie
Registered: Jun 2009
Posts: 6
Original Poster
Rep:
Quote:
Originally Posted by
AlexeyVP
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....
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 01:25 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News