« Previous Next »

Thread: php does not work

Last post 06-02-2009 10:33 PM by dragon52. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 06-01-2009, 7:29 AM

    • dragon52
    • Not Ranked
    • Joined on 06-01-2009, 7:20 AM
    • Posts 4

    php does not work

    Hi all,

    I  have installed fastcgi 5.1  and PHP.

    I have ran the script and checked that the ini file has the [Types], [PHP] entries and IIS web site has the .php extension.

    problem: when I run my php code I get the html debug lines but anything inside  <?php ?> code are ignored.

    Anyone know what I need to do/check?

    Thanks

    Denis

  • 06-01-2009, 8:52 AM In reply to

    Re: php does not work

    Hi,

    If you follow the steps outlined here it should just work :

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

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 06-02-2009, 2:09 AM In reply to

    • dragon52
    • Not Ranked
    • Joined on 06-01-2009, 7:20 AM
    • Posts 4

    Re: php does not work

    Hi Paul.

    thanks for our reply

    Someone gave me a similar  link to install fastcgi for IIS 5.1 and I have followed all the steps. I don't know what I may have done wrong.

    Do you have suggestions that I can idenitfy the problem?

    When I run the file from IE I get html code but not the php code while if I run from the command line window I get all the php code but not the html.

     thanks

  • 06-02-2009, 4:14 AM In reply to

    Re: php does not work

    Hi,

    It sounds as though PHP isn't configured to process requests. Have you tried a simple Hello World page ?

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 06-02-2009, 7:59 AM In reply to

    • dragon52
    • Not Ranked
    • Joined on 06-01-2009, 7:20 AM
    • Posts 4

    Re: php does not work

    Yes, here is the code

    <html>
    <head>
    </head>
    <body>
    Hello - <?php echo "world"; ?>
    </body>
    </html>

    and here is the output

    Hello -

    The windows/system32/inetsrv/fcgiext.ini has the following entries

    [Types]
    php=PHP

    [PHP]
    ExePath=d:\documents and settings\denis\phpx\php-cgi.exe

    system variables

    PHPRC    ->      d:\WINDOWS\system32\inetsrv

    PATH       ->      ...;d:\Documents and Settings\Denis\phpx

    application mapping

    .php        ->       d:\WINDOWS\system32\inetsrv\fcgiext.dll

    PHP and hello.php are located at d:\...\denis\phpx

    fastcgi is located at d:\WINDOWS\system32\inetsrv

    thanks

  • 06-02-2009, 11:06 AM In reply to

    Re: php does not work

    Hi,

    You've got PHPRC pointing to the system32\inetsrv folder. Is that where your php.ini file lives ?

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 06-02-2009, 10:33 PM In reply to

    • dragon52
    • Not Ranked
    • Joined on 06-01-2009, 7:20 AM
    • Posts 4

    Re: php does not work

    Paul,

    I have changed things back and forth a few times to get it to work. I got confused between fcgiext.ini and php.ini.

    PHPRC is now pointing back to d:\documents and settings\denis\phpx where php.ini is.

    The problem remains !!!

    I am sure I had it like that before anyway.

    Following someone's instructions before I added the following to the php.ini file

    ; Denis' changes
    cgi.force_redirect = 0
    doc_root = "d:\documents and settings\denis\phpx"
    cgi_redirect_status_env = ENV_VAR_NAME

    Not sure what this does.

    thank for your help

    Denis

     

Page 1 of 1 (7 items)
Microsoft Communities