SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,316
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Firefox wants to know how to run http://localhost

    I had successfully been running PHP and MySQL on my personal computer (Win XP). When I went to http://localhost, then a home page started up fine where I can click on a link on that page to run phpMyAdmin. (I used WAMP5 to download and install these files.)

    Now when I go to http://localhost, a popup says that Firefox wants to know what program to use to open the PHP file. If I choose Firefox, then I see a page with the PHP code instead of the code execution. Yet all services, including the Apache server, are running.

    I can't think of anything that would have invalidated PHP on my system. Any ideas?

    Thanks,
    Steve

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Northern Minnesota
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm no expert but it seems like maybe your httpd.conf file has gotten corrupted or changed. If you are running similar versions to mine, check your C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf file for the lines like this:

    Code:
    #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    PHPIniDir "C:\\Program Files\\PHP\\"
    LoadModule php5_module "C:\\Program Files\\PHP\\php5apache2_2.dll"
    and also maybe this line:
    Code:
    <IfModule dir_module>
        DirectoryIndex index.php index.html index.htm
    </IfModule>
    there should be a file called httpd.conf.bak that is a backup of that file, so you might try copying that file over.

    Also possible that there is a problem with your PHP installation. Easiest thing to do would be to uninstall and re-install it. An easy way to test that PHP is being processed is to put the info.php file into your htdocs folder. (sometimes called phpinfo.php) and try to access it.

    Hope this helps...

  3. #3
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,316
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    <IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
    </IfModule>

    Thanks! This code is there and the index.php is in the right place. I guess I'll uninstall and reinstall everything!

    Steve H


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •