« Previous Next »

Thread: PHP on IIS 7

Last post 02-10-2009 11:18 PM by holmes88. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 11-06-2008, 6:25 PM

    PHP on IIS 7

    Hello to everyone. I am trying to get PHP 5.2.6 to work on IIS 7. I followed all the directions in the article "Using FastCGI to Host PHP Applications on IIS 7.0", located here:  http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/

    I followed all the steps, opened up a command prompt, typed in C:\PHP>php - info and it retured all the dependencies and PHP confituration information...sweet up to this point.

    I continued with the rest of the installation instructions, configured IIS to Handle PHP Requests, created a phpinfo.php page, <?php phpinfo() ; ?>

    I pulled up a browser and try to pull up the phpinfo.php page and get a 500 Internal Server error.

     

    Any suggestions?

  • 11-06-2008, 6:49 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 651

    Re: PHP on IIS 7

    Is there any error description? Try enabling detailed error messages in IIS to get the description of the error.

    http://ruslany.net
  • 12-10-2008, 11:57 PM In reply to

    • tk7275
    • Not Ranked
    • Joined on 12-11-2008, 4:41 AM
    • Posts 1

    Re: PHP on IIS 7

    Not to hijack this thread, but I'm experiencing similar issues.

    I followed the instructions in this blog: http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/

    I'm running Windows 2008 x64 in a VMware ESXi Virtual Machine.  All network components are working, as I'm able to a) download patches and b) get to this blog to write this post :)

    Directions seemed to be going fine, I got the 5.2.8 version of PHP, installed the IIS7 admin tools for FastCGI administration, etc.  Typed in c:\php\php -info and a whole slew of text scrolled across my machine.  Yay!

    But then, I tried two things: 1) place the phpinfo.php into the c:\windows\inetpub directory, and 2) created a c:\www\phptest directory, placed the phpinfo.php and an index.php (both with the same text), created a virtual directory called phptest

    I tried http://localhost/phpinfo.php  and http://localhost/phptest and http://localhost/phptest/phpinfo.php.

    I ensured that phpinfo.php and index.php were included in all the default documents (even made it first on the list.)

    One thing I noticed, the docs say if you don't see the modules listed (mind you, that's if the website even worked) to edit the applicationHost.config file - I don't have that file in my system32\config... it's in a HISTORY directory...  (it exists on my Windows2003 server in that location, but not Windows 2008)  Is that causing issues?

    And I got error 403.14 - Forbidden

    Module: DirectoryListingModule

    Notification: ExecuteRequestHandler

    Handler: StaticFile

    ErrorCode: 00000000

    (Logon method and user, both Anonymous)

    If I tried http://localhost/phptest/phpinfo.php I got the generic "The webpage cannot be found."

    I tried downloading the x64 bit verion from Fusion (5.2.5)... Same errors

    I had similar experiences with getting PHP to work on Windows 2003 R2 with IIS6.

    PHP from the commandline works - but can't get IIS to get it to work.

    Using things like Filemon (on Win2003 at least) never really revealed where I didn't have permissions.

     

    I'm new to IIS7, so maybe it's a security thing?  Dunno.  It's a pretty vanilla Windows 2008 Server.  Freshly created to get IIS7 and PHP working (with FastCGI)

     

    Any help or directions would be nice.


    Thanks,

    TK

     

     

  • 02-10-2009, 11:18 PM In reply to

    • holmes88
    • Not Ranked
    • Joined on 02-10-2009, 11:10 PM
    • Posts 1

    Re: PHP on IIS 7

    Hello how are you going?

     Me too, i  had the same problem and like back at the school where i learnt php , never trust what the manual says, they too sometimes forget to tell you simple things, like

    open_basedir = "C:\inetpub\wwwroot"

     

    they dont tell you to put in the  "" quotation marks!!!i got a 500 error until i guessed the resolution... try that, its a simple solution, and also check any other directory listings in your php.ini file for pointing to folder locations.. that they have a quotes

Page 1 of 1 (4 items)
Microsoft Communities