Please tell me this isn't happening!

Discussion in 'Apache' started by nfzgrld, Aug 17, 2008.

  1. #1
    Anyone who's installed Apache and PHP, Perl, or similar on windows has probably run into this problem. Lord knows I've run into it every time. Usually it's easy to fix, but for some reason, this one isn't going away.

    Apache 2.2.9, PHP 5.2.6, W2K SP4 Server.

    Ok, when I try to hit one of my php based sites on the server it gives me an "open with or save" type dialog.

    I installed Apache and PHP with the windows installers. I got all the permissions, etc. set properly which is always a problem with this config, but easy enough to fix. I've checked the mime type setting. AddType, Option, LoadModule, etc. stuff is all as it should be according to the docs. php.ini IS being loaded and everything in it seems to load fine. Still, no matter what I do I can't get the damn thing to actually execute a php file, on a small file like:
    <?php echo "Hello!"; ?>
    Code (markup):
    I get the code, all of it. If I try to run something more complex, like phpMyAdmin for instance, it asks if I want to open it or run it. I hate this, I've run into it many times and thought I knew all the various reasons for it. Apparently I missed one, or it's something new with this version of Apache. The last version I installed was 2.2.5, I don't see a lot of major changes, but hey, I could be wrong. It's acting like it doesn't know what to do with the .php files, but everything is configured as the docs at apache and php.net say they should be. Any ideas out there what's going on with this?
     
    nfzgrld, Aug 17, 2008 IP
  2. zacharooni

    zacharooni Well-Known Member

    Messages:
    346
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    120
    #2
    You might be looking for AddHandler, not AddType.
     
    zacharooni, Aug 18, 2008 IP
  3. imphpguru

    imphpguru Active Member

    Messages:
    439
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Hi, if you really want to install PHP / Apache on your windows local machine, it is better that you go for an entire package. wampserver / xampp, both of these are sexy one click installs and you can be away from the hazards of the tough installations :).
     
    imphpguru, Aug 19, 2008 IP