LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   application/x-httpd-php download (https://www.linuxquestions.org/questions/linux-server-73/application-x-httpd-php-download-4175426465/)

rewards 09-10-2012 02:07 AM

application/x-httpd-php download
 
Hello all,

When I try to access my site at www.mysite.com, I get this error message "application/x-httpd-php download" The browser tries to download a file instead of accessing the site. Does anyone know what the problem would be? Thank you

bathory 09-10-2012 02:40 AM

Hi,

You didn't mention your distro and how you've installed php.
Anyway the error you get means that apache is not aware of php. Check apache config file and see if you have the following 2 lines:
Code:

LoadModule php5_module        modules/libphp5.so
AddType application/x-httpd-php .php

Regards

rewards 09-10-2012 12:47 PM

I have Centos 6.3 64bit with Parallel Plesk installed on a dedicated server from 1 & 1 Internet service provider. Before I did not have this problem. One time the website had problem, I had to backup, bring it down, upload the script and install the site without any problem. But now I get that message. I added this LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php at the bottom of the php.ini file and restated the httpd but still get the same problem.

bathory 09-11-2012 12:47 AM

Quote:

Originally Posted by rewards (Post 4777047)
I have Centos 6.3 64bit with Parallel Plesk installed on a dedicated server from 1 & 1 Internet service provider. Before I did not have this problem. One time the website had problem, I had to backup, bring it down, upload the script and install the site without any problem. But now I get that message. I added this LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php at the bottom of the php.ini file and restated the httpd but still get the same problem.

You are supposed to add those 2 lines in apache configuration file(s), not in php.ini!!!
For a default php installation on Centos those lines are included in /etc/httpd/conf.d/php.conf, but I don't know if Plesk changes that. You can search under /etc/httpd/conf and /etc/httpd/conf.d to see if they exist.

Regards


All times are GMT -5. The time now is 05:03 PM.