• Prompt to save/open php file instead of displaying WP site locally

    Whenever I try to go to localhost/wordpress in Firefox I get a prompt to save/open a php file (it does not give me the name of the file) instead of displaying the WP site properly. Has anyone else run into this problem?

    PHP is working without problems, when I launch phpinfo() I get all data.

    I’m working under Windows Vista, Apache 2.2

    a screengrab of the prompt is here

    Any help would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You may need to look into adding a php handler to your httpd.conf file.

    I think this is the basic syntax you may want to search for;

    AddType application/x-httpd-php

    http://wordpress.org/search/AddType+application%2Fx-httpd-php?forums=1

    AddType application/x-httpd-php httpd.conf “how to” wordpress

    Thread Starter oreste

    (@oreste)

    Did it, I also tried a combination of several suggestions, before posting here, as follows:

    AddHandler server-parsed .php
    AddType application/x-httpd-php .php .htm .html
    AddHandler x-httpd-php .php .htm .html

    At the moment I’m working with the following instructions:

    DirectoryIndex index.html index.php
    LoadModule php5_module “C:/php/php5apache2_2.dll”
    AddType application/x-httpd-php .php
    PHPIniDir “C:/php”

    It is probably not related with http.conf otherwise I could have the same problem with other php scripts, while they are working with no hassle. The problem is WP related, maybe some incompatibility with php5 (i’m just wondering).

    I’m also wondering whether the problem could be located inside wp-includes/functions.php there an array is initialized by the following function: get_allowed_mime_types()
    within the list, php type is not present.

    I’m having a similar problem, only it’s off and on. Sometimes it will execute properly, but other times, it prompts to open the file. If I hit the link a couple times, eventually it will execute.

    I’m really stumped on this as there doesn’t seem to be any rhyme or reason to the problem. If it helps, my server is running SunOS.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prompt to save/open php file instead of displaying WP site locally’ is closed to new replies.