LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   New apache install, php files are downloading rather than displaying (https://www.linuxquestions.org/questions/linux-software-2/new-apache-install-php-files-are-downloading-rather-than-displaying-762621/)

abefroman 10-17-2009 01:43 PM

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

lutusp 10-17-2009 02:32 PM

Quote:

Originally Posted by abefroman (Post 3722940)
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.

abefroman 10-17-2009 06:25 PM

Fixed it the correct line was
Code:

AddType application/x-httpd-php .php5 .php4 .php
It didn't need the 5


All times are GMT -5. The time now is 07:27 AM.