LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2009, 01:43 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
New apache install, php files are downloading rather than displaying


New apache install, php files are downloading rather than displaying, does anyone know whats causing this.

When I compiled php with apxs it automatically added this line:
Code:
LoadModule php5_module        modules/libphp5.so
I restarted apache, and also try adding this line:
Code:
AddType application/x-httpd-php5 .php5 .php4 .php
and then restarting.

Still no luck.

Any ideas?

TIA
 
Old 10-17-2009, 02:32 PM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by abefroman View Post
New apache install, php files are downloading rather than displaying, does anyone know whats causing this.

When I compiled php with apxs it automatically added this line:
Code:
LoadModule php5_module        modules/libphp5.so
I restarted apache, and also try adding this line:
Code:
AddType application/x-httpd-php5 .php5 .php4 .php
and then restarting.

Still no luck.

Any ideas?

TIA
Have you looked into you HTTP log, typically located at:

Code:
/var/log/httpd/access_log
If the server gets a request it chokes on, a log entry normally will describe the problem.
 
Old 10-17-2009, 06:25 PM   #3
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Fixed it the correct line was
Code:
AddType application/x-httpd-php .php5 .php4 .php
It didn't need the 5
 
  


Reply


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 2, PHP 5, SuSE 9.2 - cannot run php files dickohead Linux - Networking 6 06-28-2006 10:25 AM
PHP Code to check how many users are downloading files. farmerjoe Programming 8 04-01-2005 03:23 PM
Apache problem with displaying compression/archive files. Akujin Linux - Networking 4 03-09-2005 02:18 AM
php4 problem _ downloading index.php instead of displaying tharris Debian 2 10-24-2003 06:13 PM
downloading php files JubeiZon General 5 09-21-2003 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:31 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