The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Browser tries to download .php file (4 posts)

  1. sleeplessinDC
    Posted 7 years ago #

    Since installing WordPress 2.8.1, I and several users have been having problems with links trying to download a page as 'application/x-httpd-php' instead of serving HTML. Is there something wrong with the configuration for application/x-httpd-php in WordPress or is there something I need to add to my .htaccess file to make the links work correctly?

    It doesn't happen consistently but happens often. For example, clicking on a link doesn't take you to that page. Instead, it may bring up a dialog box that says I am trying to download a page of application/x-httpd-php called index.php--do you want to save it?

    I've experienced this myself and so far have heard from 3 people that they are having the same problem in IE7 and Firefox 3.0 on Windows XP, and Firefox 3.5 and Safari 4.? on Mac OSX

  2. esmi
    Forum Moderator
    Posted 7 years ago #

    Try contacting your hosting provider. There's an issue with the server set up.

  3. Steve
    Posted 7 years ago #

    Is there anything in your apache or php error logs? You've not got the Suhosin hardening patch installed in PHP have you? I've seen it crash out with a canary error which makes Apache deliver the php file as a download.

  4. sleeplessinDC
    Posted 7 years ago #

    The answer for me was that I had recently switched from one host who was using PHP4 to another host who is using PHP5. I still had a PHP4 line in my .htaccess file. I change from
    AddType application/x-httpd-php .html .htm

    to AddType php5-cgi .html .htm

Topic Closed

This topic has been closed to new replies.

About this Topic