I've been searching the internet/Google/etc. for about a week now trying to figure out what I am doing wrong. I just got a new Windows Vista Enterprise 64 bit machine and am trying to install PHP 5.2.3. I have tried php-5.2.3-x64-2007-06-09 from a 3rd party site, and php-5.2.3-Win32 & php-5.2.3-win32-installer without success. I have checked out the following blogs/websites, among others:

http://blogs.msdn.com/david.wang/archive/2006/04/04/HOWTO_Install_and_run_PHP_on_IIS7.aspx

http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3516915

http://www.canerten.com/php-installation-with-extensions-mysql-for-iis7-in-windows-vista/

http://blog.ilikeu2.nl/2007/01/12/iis7-http-error-4043-not-found-for-php-cfm-etc/

...followed the instructions, and still no go. I've made the changes to allow 32-bit programs. Is it a priviledge thing? I have admin status but am still using the user system that ships with the OS. Do I need to add some entries for IIS_.... that I've seen suggested? I tried it once and it didn't seem to do anything, but maybe should try again? Any other ideas? I am at a point where I'm willing to try just about anything!

All I can get when going to http://localhost/test.php is:

Server Error in Application "Default Web Site"


HTTP Error 404.3 - Not Found
Description: The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed.

Error Code: 0x80070032

Notification: ExecuteRequestHandler

Module: StaticFileModule

Requested URL: http://localhost:80/test.php

Physical Path: C:\inetpub\wwwroot\test.php

Logon User: Anonymous

Logon Method: Anonymous

Handler: StaticFile

Any advise is much appreciated.

bpat1434 wrote:

After working with pheck on Yahoo! IM, we got Apache 2.2.x working with php5.

Solution: This Post

    If you don't need IIS, I wrote a pretty thorough tutorial for getting php4 & 5 together with Apache on Windows (and Vista Ultimate 64 is my OS). I'm running Apache 2.0.59 and php 5 right now without issue.

    Check it out

    Although it seems that your server doesn't recognize the "php" extension which means something didn't go right. I've never used the installers before, so I'm not sure how they work. See if in your IIS config you have an application handler for php. If not, that's your issue.

      thanks for the link. I very well may go to apache as you suggest if my one last ditch effort with my brother doesn't work. one question, do i need to move my inetpub folder (with wwwroot) so when I de-install IIS it doesn't delete it? That's where all my websites are now obviously. also, i did have the php handler in place... it's very weird that it isn't working. i can't see why it wouldnt. Thanks.

      oh one other huge thing.... I already have all my documents (gigs worth) under my login for the UAC. would disabling/deleting it delete all my docs and settings for the install? that would be a huge deterent.

        UAC is just a layer. If you disable it, no documents or anything on your system is affected. Only how applications interact with the OS.

        I'm not sure about uninstalling IIS. You might just want to zip it up just be sure 🙂 That's one reason why I have one drive dedicated to Web Design stuff. That way if Apache fails, or my OS needs re-building, I can feel safe that my design stuff is still around on a separate disk.

          So I followed your thread (or tried to). I only need php5 to work. I have apache running on the machine (nice) but PHP is still an issue. When I go to http://localhost/test.php5 it prints out my php code instead of executing the script: (<?php print("hello world");?>. Can you tell me where I went wrong? I also want .php to work and not just .php5, and I want index.php to be recognized as a default index file. This is what I have:

          C:\Program Files (x86)\Apache Software Foundation

          In this dir are two dirs, Apache2.2 and php5

          Going into conf/extra, this is what I have for httpd-php.conf:

          PHP 5 as CGI

          <Directory "C:/Program Files (x86)/Apache Software Foundation/php5/">
          Options +ExecCGI
          Order allow,deny
          Allow from all
          </Directory>
          ScriptAlias /php5/ "C:/Program Files (x86)/Apache Software Foundation/php5/"
          AddHandler application/x-httpd-php5 .php5
          Action application/x-httpd-php5 "/php5/php-cgi.exe"

          This is what I have for the entry on the path for windows: ;c:\Program Files (x86)\Apache Software Foundation\php5 at the very end of the String.

          So I'm stumped. Any ideas? Thanks!

            If you're only running php5, I'd suggest using php as a module, rather than using it as a CGI. You get some performance enhancements but lose some security.

            Anyway, Make sure the path to the php cgi is correct. If it's correct, then try loading it as a module:

            LoadModule php5_module "C:/Program Files (x86)/Apache Software Foundation/php5/php5apache2.dll"
            AddType application/x-httpd-php .php .php4 .php5
            PHPIniDir "C:/Program Files (x86)/Apache Software Foundation/php5"

            Also, add your path to PHP into the Windows Path (if it's not there yet). Oh, and don't forget to restat apache 😉

              shoot, i tried that and still it prints out the code, instead of executing. Also, .php still doesn't work, only .php5.

                bpat1434 is the man. IM'd with him some tonight and he helped me through some stuff. I never was able to get the .dll working but CGI works! I got rid of the httpd-php.conf file and just added this directly into the httpd.conf file in Apache2.2/conf:

                PHP 5 as CGI

                <Directory "C:/Program Files (x86)/Apache Software Foundation/php5/">
                Options +ExecCGI
                Order allow,deny
                Allow from all
                </Directory>
                ScriptAlias /php5/ "C:/Program Files (x86)/Apache Software Foundation/php5/"
                AddHandler application/x-httpd-php5 .php5
                Action application/x-httpd-php5 "/php5/php-cgi.exe"

                now to get MySQL to work :eek:

                  In case anyone was wondering, the error he kept getting was:

                  (OS 995)The I/O operation has been aborted because of either a thread exit or an application request. : winnt_accept: Asynchronous AcceptEx failed.

                  Some research on Google brought up an Apache bug that I never could track down. No real answers were given on how to fix it, other than "hacking" the apache.exe program.

                  pheck was able to track it down to the LoadModule line, in which case that was a mistake upon my part. If you're using Apache 2.0.x then the proper DLL is php5apache2.dll, but we're using 2.2.x so the proper dll is php5apache2_2.dll. Once he switched to run it as a CGI it worked. But I know that the path to the dll was wrong and an error on my part in the IM conversation.

                  So, to recap, to get apache and php5 running together, use this in your httpd.conf:

                  ##
                  ## PHP 5 as a CGI
                  # <Directory "<PathTo>/php5/">
                  #    Options +ExecCGI
                  #    Order allow,deny
                  #    Allow from all
                  # </Directory>
                  # ScriptAlias /php5/ "<PathTo>/php5/"
                  # AddHandler application/x-httpd-php5 .php5
                  # Action application/x-httpd-php5 "/php5/php-cgi.exe"
                  #
                  ##
                  ## PHP 5 as a Module
                  #
                  ### Apache 2.0.x
                  # LoadModule php5_module "<PathTo>/php5/php5apache2.dll"
                  ### Apache 2.2.x
                  # LoadModule php5_module "<PathTo>/php5/php5apache2_2.dll"
                  #
                  ### Both Apaches
                  # AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml
                  # AddType application/x-httpd-php-source .phps
                  # PHPIniDir "<PathTo>/php5/php.ini"

                  Just uncomment (remove the "#") from the lines you want. You can run as a CGI or as a module. Just make sure you use the correct LoadModule line.

                    Write a Reply...