« Previous Next »

Thread: IIS 7 & PHP Problems

Last post 09-19-2008 10:08 PM by Zarre. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 09-18-2008, 12:00 AM

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    IIS 7 & PHP Problems

     I tried installing PHP 5.2.6 using Bill's methods before successfully. I've recently reformatted my computer and attempted it again. This time I am running into problems.

    My html pages are working, but my php pages are hanging and they saying that (IE7) Internet Explorer cannot display the webpage or (FF3) The connection to the server was reset while the page was loading. Any ideas?

  • 09-18-2008, 12:17 AM In reply to

    • mukhtard
    • Top 50 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 202

    Re: IIS 7 & PHP Problems

    Are you using FastCGI or are you using PHP as a ISAPI/CGI?

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-18-2008, 1:16 AM In reply to

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    Re: IIS 7 & PHP Problems

     I'm using PHP as a ISAPI/CGI, I've used the installer and the .zip file.

  • 09-18-2008, 2:39 PM In reply to

    Re: IIS 7 & PHP Problems

    I'm not sure the installer sets the fastcgi module or not.  This article might help.

    http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 09-18-2008, 3:49 PM In reply to

    • mukhtard
    • Top 50 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 202

    Re: IIS 7 & PHP Problems

    Can you reconfirm that you haven't missed any step in Bill's blog?

    Also can you turn on failed request tracing and see what is causing the error?

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-18-2008, 4:59 PM In reply to

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    Re: IIS 7 & PHP Problems

     I'm fairly certain that I installed it correctly.
    3) php.ini-dist is now in c:\windows\php.ini
    4) IIS7 was installed w/ ASP, CGI, ISAPI Extensions, ISAPI Filters, Server-Side Includes
    5/6/7) Added Script Map PHP w/ *.php as request path and C:\inetpub\PHP\php5isapi.dll as Executable
    9) Clicked "Yes"
    10) Upon trying to access page it just hangs.

     I'm not 100% sure if i have failed request tracing on or not. I know that If i enter the wrong page ( 2.php )  I immediately receive:

    HTTP Error 404.0 - Not Found

    Description: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    Error Code: 0x80070002

    Notification: MapRequestHandler

    Module: IIS Web Core

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

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

    Logon User: Anonymous

    Logon Method: Anonymous

    Handler: PHP

    But on the page which actually exists I receive:

    Internet Explorer cannot display the webpage
    Most likely causes:

        * You are not connected to the Internet.
        * The website is encountering problems.
        * There might be a typing error in the address.

     

    The thing that really boggles me is that when the page doesn't exist it is using the php handler. When the page exists it can't connect. I have the php handler permissions set to Read / Script / Execute. Normally when it installs it is just Reat / Script.

  • 09-18-2008, 9:19 PM In reply to

    • mukhtard
    • Top 50 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 202

    Re: IIS 7 & PHP Problems

    I don't see anything wrong in your steps.

    Some questions for you:
    Is your OS 64-bit by any chance? If yes make sure to run your application pool as 32-bit since PHP is 32 bit.
    Is the access for the php5isapi.dll handler set to 'Script'?

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-19-2008, 1:34 AM In reply to

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    Re: IIS 7 & PHP Problems

     It says that it is a 32-bit Operating System, but i have allowed 32bit scripts. I've also set the handler to have Read, Script, and Execute allowed.

    I'm using an Acer computer and I've only experienced problems with Vista. Sometimes, the updates kill my components. My sound is still not working from one of those, even after Restoring to Factory Defaults. Prior to reformatting my computer I lost my php. I reset my computer to a previous restore point and my php worked, but then my Adobe products had errors. Couldn't really find a balance so i figured it would be easier to Format and just reinstall everything w/o adding updates. Seems to be to no avail. ASP and other components are still working fine at least.

  • 09-19-2008, 1:50 AM In reply to

    • mukhtard
    • Top 50 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 202

    Re: IIS 7 & PHP Problems

    Let's get tracing running to figure this out.

    Check http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis7/ to see how to go about doing it.

    For status code(s) set something like 200-600 .

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-19-2008, 4:11 AM In reply to

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    Re: IIS 7 & PHP Problems

     I think i did it. Did the suggested ASP fail to test that it was working. That showed up. Tried a php page and it didn't give me anything.

    Is there anyway to remove all the IIS7 and the PHP stuff and start from the begining with a fresh IIS? Maybe just starting from the begining will help.

     Sorry, I know how hard it is to walk through things with people. Especially over the net :(

  • 09-19-2008, 7:44 PM In reply to

    • mukhtard
    • Top 50 Contributor
    • Joined on 07-07-2008, 5:13 PM
    • Redmond, WA
    • Posts 202

    Re: IIS 7 & PHP Problems

    To uninstall IIS on Vista:

    Start -> Run -> appwiz.cpl -> Turn windows features on or off -> Internet Information Services (uncheck and click ok)

    On Server 2008:

    Start -> Run -> appwiz.cpl -> Turn windows features on or off -> Server Manager -> Roles -> Web Server (IIS) -> Right click and select 'Remove Role Services'

    Regards to PHP, just delete your PHP folder and the php.ini file if it is in a different folder.

    Thanks,
    Mukhtar Desai
    IIS Performance Team

  • 09-19-2008, 10:08 PM In reply to

    • Zarre
    • Not Ranked
    • Joined on 02-05-2008, 5:00 AM
    • Wisconsin
    • Posts 11

    Re: IIS 7 & PHP Problems

     Alright, I wanted to be sure that was the only way and that there wasn't a better one.

    Well, I'm going to install from the top. Tell you if I hit any problems.

Page 1 of 1 (12 items)
Microsoft Communities