Whenever I launch a .php file from 127.0.0.1 with a browser (FireFox or IE) I get the Open With or Save File pop up window. If I rename the .php as an .html file, I simply get a blank page when I launch it.

I am running Apache 2.2.14 and PHP 5.3.1 with my PC running Windows 5.1 build 2600 (Windows XP Home Edition Service Pack 3) i586.

I have included "AddType application/x-httpd-php .php" in the Apache httpd.conf file hoping that would make it work...it didn't.

What am I doing wrong here?

    What exactly are you typing into the address bar if your browser? Something like http://localhost/myfile.php ?

    AmonRa60 wrote:

    I have included "AddType application/x-httpd-php .php" in the Apache httpd.conf file hoping that would make it work...it didn't.

    What am I doing wrong here?

    If that's the only modification to httpd.conf you made, then... what you're doing wrong is not reading the installation instructions. 🙂

    See these manual pages in regards to installing PHP: [man]install.windows.manual[/man] and [man]install.windows.apache2[/man].

      I haven't used XAMPP before, but I would assume that the 'htdocs' folder is the root of the website, so a file named test.php in that folder would be accessed via http://localhost/test.php .

      EDIT: Also note that the point of using (or not using, IMHO :p) XAMPP is that everything is preconfigured for you, thus you should not have made any modifications to the httpd.conf file.

        The assumption on using htdocs is correct. However, my addition of the AddType was the result of the failure to read the test.php file in the first place.

        No error is returned, just a blank page is shown. Some research showed that it may get resolved by turning on the AddType as shown in my previous notes. It did not help.

        Does anyone out there have any other ideas? I am not an expert obviously (hence I am in the Newbie section).

          Nothing is returned at all? Are you viewing the source code of the page in your browser?

          If so, perhaps your PHP script has an error and display_errors is turned off? Have you tried a simple phpinfo.php script that has nothing but:

          <?php
          
          phpinfo();
          
          ?>

          ?

            The php code you suggested is exactly what I have done to test my php/apache/mysql installation:

            <?php

            phpinfo()

            ?>

            I get absolutely nothing, zip, page is blank...

            All I get each time I launch it with a browser (Firefox or IE) is the pop up window asking me if I want to open this file with a browser or save it. If I launch it with a browser I loop back to the open this file with a browser or save it pop up (loop-de-loop, and around we go).

            I have double checked the Apache service and it is working just fine (apparently).

              Just to be sure, what do you mean by "launch it with a browser" - you mean by opening a web browser and typing in "http://localhost/phpinfo.php" ?

              If that's the case, sounds like you might want to uninstall XAMPP and re-install it (or re-install and configure the pieces separately).

                If you run IIS or another web server or service that uses port 80, you can't share ports and XAMPP would be configured to use an alternate port. As a suggestion, please double check the port that XAMPP is actually using and make sure no conflicts, i.e. a lot of folks like to use 8080 for example. If true, your URL would change to something similar in syntax to this:

                http://localhost:8080/path_to/whatever.php

                -jim

                  Write a Reply...