Support » Fixing WordPress » Browser tries to download .php file

  • Resolved sleeplessinDC


    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi


    Forum Moderator

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



    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.



    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Browser tries to download .php file’ is closed to new replies.