Product:
Search Type:

When I try to access any PHP page, the browser offers me to save it instead of showing content.

Article ID: 3505 
Last Review: Dec,19 2007
APPLIES TO:
  • Plesk for Linux/Unix

SYMPTOMS

When I am trying to open some PHP page, for example Webmail interface, the browser offers me to save the page instead of showing it's content.

CAUSE

This issue occurs if wrong mime type is assigned to '.php' extension or when PHP Apache module is not configured properly.

RESOLUTION

Make sure that proper mime type (text/html) is set for '.php' file extension:
#grep 'AddType.*\.php' /etc/httpd/conf.d/* /etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/php.conf:AddType text/html .php


Check that PHP module is loaded into Apache configuration:
#grep 'LoadModule.*php' /etc/httpd/conf.d/* /etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/php.conf:LoadModule php5_module modules/libphp5.so


Restart Apache after any changes in configuration files.

Note, paths to Apache configuration files in your Operating System may differs from the ones that are listed above.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields