« Previous Next »

Not Answered Thread: Install problem Windows 7 PHP5.2.11

Last post 11-03-2009 1:26 AM by don.raman. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 11-02-2009, 11:39 PM

    • dbay55
    • Not Ranked
    • Joined on 11-03-2009, 4:33 AM
    • Posts 4

    Install problem Windows 7 PHP5.2.11

    I previously had a manual install of 5.3 on the computer which was not working (just blank screens), then I installed 5.2.11 via the Web Platform Installer from this website. Now when I point to the test file in localhost, I get HTTP error 404.0 error code 0x80070002, module IIS Web Core, MapRequestHandler, StaticFile, anonymous user and logon method.

     Again, this is Windows 7 IIS7.5.

     Any help is appreciated.

  • 11-02-2009, 11:45 PM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    Hi,

    Did you remove PHP 5.3 completely? I believe there are still something left which is creating the problem.

    Can you run the below command:

    %WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:*

    Also run:

    %WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers /text:* | findstr /i PHP

    And paste the output of each of these.

    Also open IIS Manager (press Windows key + R and type 'inetmgr'). Please browse to 'Handler Mappings' section and see what is your mapping for *.php. My guess is that you still have stale handler mapping somewhere.

    You should also run 'C:\Program Files\PHP\php-cgi.exe' <path to a simple PHP file> and ensure that the output is correct. This will validate at least the fact that PHP is running fine.

    Thanks,

    Don.

     

  • 11-03-2009, 12:09 AM In reply to

    • dbay55
    • Not Ranked
    • Joined on 11-03-2009, 4:33 AM
    • Posts 4

    Re: Install problem Windows 7 PHP5.2.11


    C:\>%WINDIR%\system32\inetsrv\appcmd.exe list config /section:fastcgi /text:*
    ERROR ( message:Configuration error
    Filename: redirection.config
    Line Number: 0
    Description: Cannot read configuration file due to insufficient permissions
    . )

     

    ?? I am logged in Admin, not sure what to make of this.

     

    and no output from %WINDIR%\system32\inetsrv\appcmd.exe list config /section:handlers /text:* | findstr /i PHP

     

    Handler mapping for *.php is the same as before "C:\Program Files (x86)\PHP\php-cgi.exe", FastCgiModule, with restriction to invoke handler only if request is mapped to file or folder.

     

     Finally, on your last suggestion, php-cgi.exe is missing from my PHP folder.

  • 11-03-2009, 12:28 AM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    Hi,

    Try running these from an elevated command prompt. Both the command should print valid output.

    Seems like your installation is wrong. Now do one thing. Please uninstall whatever you have installed and ensure that system is in a clean state. Try to remove IIS FastCGI too. This article explains how to turn it ON http://technet.microsoft.com/en-us/library/cc753077(WS.10).aspx. Just uncheck the 'CGI' box and it should get uninstalled.

    Now follow the blog at http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx to make PHP 5.2.11 running. If you want to use PHP5.3 you should follow the blog at http://blogs.iis.net/donraman/archive/2009/10/08/upgrading-to-php-5-3-an-easy-way.aspx.

    This should solve your problem. Let me know how it goes.

    Thanks,

    Don.

  • 11-03-2009, 12:31 AM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    You can uninstall PHP by going to Control Panel-->Uninstall a program and uninstall PHP. You will have an entry if you have used PHP MSI to install it. If not just delete the folder.

    Thanks,

    Don.

  • 11-03-2009, 12:49 AM In reply to

    • dbay55
    • Not Ranked
    • Joined on 11-03-2009, 4:33 AM
    • Posts 4

    Re: Install problem Windows 7 PHP5.2.11

    I started the uninstall and re-install after not finding the exe.

    I still get the same error on the http, but the command line works with the exception that PHP sees none of the dll's.

    Just trying to get 5.2.11 running now.

  • 11-03-2009, 12:57 AM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    Did you install PHP from WEBPI following my blog. After you uninstalled PHP please remove stale PHP.INI file. Start from utmost clean state with no trace of PHP of fastCGI on the machine. Your PHP is not finding the DLL because they are loaded as part of PHP.INI but not present in C:\Program Files (X86)\PHP\ext folder.

    Thanks,

    Don.

  • 11-03-2009, 1:01 AM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    One more thing, first fix the command line. Because if command line is not working HTTP will never work. So do this:

    • Fix command line following my previous post
    • Run both the commands I asked about in my previous posts
    • Ensure that everything is proper.
    • Now go to test HTTP by creating a simple PHPINFO file.

    Thanks,

    Don.

  • 11-03-2009, 1:23 AM In reply to

    • dbay55
    • Not Ranked
    • Joined on 11-03-2009, 4:33 AM
    • Posts 4

    Re: Install problem Windows 7 PHP5.2.11

    Looking into the errors more, the dll's being flagged were not present in the file set. So I commented them out in the php.ini.

    Everything is running now. Thanks for suggestions which got me on track.

    I am not going to upgrade to 5.3. This should be fine for me.

    Now onto MySQL install...

     

    Thanks again. Bob

  • 11-03-2009, 1:26 AM In reply to

    Re: Install problem Windows 7 PHP5.2.11

    Good to know that you are able to make PHP work. However commenting out the extensions from PHP.INI is not a great idea as sooner or later you will need them. However whenever you need to install an extension please follow the blog at http://blogs.iis.net/donraman/archive/2009/10/16/configuring-php-extension-on-windows-a-simple-way.aspx.

    Thanks,

    Don.

Page 1 of 1 (10 items)
Microsoft Communities