in

Dotnetpanel Forums

Community support forums for DotNetPanel products

DNP and PHP w/ FastCGI

Last post 01-06-2010 2:17 PM by prostoemailee. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-04-2010 1:09 PM

    DNP and PHP w/ FastCGI

    I am trying to get DotNetPanel setup on a brand new Windows 2003 R2 server to host PHP sites. I used the Microsoft Web Platform Installer to install PHP 5 and FastCGI and was able to get a phpinfo.php script to run under the default web site with no problems. I then installed DotNetPanel, and setup a new website for some testing. None of the websites I setup in DotNetPanel will run PHP, eventhough the mappings are correct in IIS under the new sites (pointed to C:\Program Files\PHP\php-cgi.exe). I give "everyone" full access to the /wwwroot directories, PHP directoy, Windows/Temp, but I continue to get page not found errors. 

    Does anyone have any suggestions on how to get this working? I am willing to completely start over if someone can provide a guide? Any help would be appreciated.

    Thanks

    -majestic
  • 01-06-2010 2:17 PM In reply to

    Re: DNP and PHP w/ FastCGI

    majestic:
    mappings are correct in IIS under the new sites (pointed to C:\Program Files\PHP\php-cgi.exe)

    Hm.. I'm confused a bit. If you want to run PHP through FastCGI there should be different mapping though:

     

    "%SystemRoot%\system32\inetsrv\fcgiext.dll"

    Limit to: GET,HEAD,POST

    Script engine: checked

    Verify that file exists: checked

     

    Then in fcgiext.ini you should assign file extension mappings, ex.:

    [Types]
    php=PHP

    ;PHP_FCGI_MAX_REQUESTS:10001 is set as System EnvironmentVariable.
    ; (!) Keep InstanceMaxRequests < PHP_FCGI_MAX_REQUESTS
    ;
    ;PHPRC:C:\Program Files\PHP is set as System EnvironmentVariable.

    [PHP]
    ExePath=C:\Program Files\PHP\php-cgi.exe
    IdleTimeout=480
    ActivityTimeout=120
    RequestTimeout=900
    ;InstanceMaxRequests=10000

     

    It should work after that.

    Please note that it's recommended to run Non-Thread-Safe PHP via FastCGI.

    More info here:

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

    http://learn.iis.net/page.aspx/248/configure-the-fastcgi-extension-for-iis-60/

    http://www.iis.net/expand/FastCGI

    Don't forget to configure recycling properly: http://learn.iis.net/page.aspx/697/configure-php-process-recycling-behavior/

     

    Good luck!

    Regards,
    Jegor.
    Filed under: , , ,
  • 01-06-2010 7:06 PM In reply to

    Re: DNP and PHP w/ FastCGI

    I managed to get this working and thought I would post my procedure for anyone else that finds this post.

    The documentation suggests that DNP is pre-configured to use PHP and FastCGI, but this isn't the case.Once PHP and FastCGI have been installed using the Microsoft Web Platform Installer, install DNP. After DNP has been installed, change the PHP 5.X Executable Path in the IIS Provider Settings to use %SYSTEMROOT%\System32\InetSrv\fcgiext.dll. For some reason DNP wants to use the php-cgi.exe as default but that doesn't work with FastCGI.

    Might want to change the documentaion to indicate this step, or change the default PHP executable path to reflect the install documents suggestion to install PHP w/ FastCGI.

     

     

     


Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems