Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    35

    Unanswered: php won't work on windows iis

    Hi,

    I am new to php and open source community and I am having great difficulty settting things up. What i want to do is set up php on my windows machine, use dreamweaver to build dynamic pages for my mySql database (this is hosed remotely).

    I have run the windows installer version of php and set up iis to accept php and wrote <?php phpinfo(); ?> saved it as a test.php, uploaded it to the wwwroot folder, ran it from the browser and received the following error:

    --------------------
    Security Alert! The PHP CGI cannot be accessed directly.
    This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

    For more information as to why this behaviour exists, see the manual page for CGI security.

    For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
    ----------------------

    Could anyone guide me through the process of how I can get php to work on iis under winxp. The 'manual page' ensures that a beginner such as myself is frightened to death and has two days free time to set it up.

    Many thanks,

    Mark

  2. #2
    Join Date
    Sep 2003
    Posts
    6
    You need to change a setting in your php.ini file (usually found in c:\windows or c:\winnt).

    Once you have located your php.ini file, search for "cgi.force_redirect".

    You will see information about when to set this option.

    Another alternative (depending on your set-up) is to use the PHP ISAPI DLL rather than the executable. The cgi.force_redirect option does not apply to the DLL.

    I have attached the PHP installation instructions in case you don't have them.
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2003
    Posts
    35
    Hi,

    Thanks for the info. After my last post I downloaded and installed phpdev which has Apache, php, and mySql together. I can access the php test page, see mySql and create tables. I think all is ok for the moment.

    Many thanks,

    Mark

  4. #4
    Join Date
    Sep 2003
    Posts
    35
    Hi,

    I had to uninstall phpdev. All i need is to install phpadmin to use with mysql and iis. I need phpadmin to make life easier when creating my database but once extracted the install icon wont work.

    Thanks for any help you can give,

    Mark




    Originally posted by jxh
    You need to change a setting in your php.ini file (usually found in c:\windows or c:\winnt).

    Once you have located your php.ini file, search for "cgi.force_redirect".

    You will see information about when to set this option.

    Another alternative (depending on your set-up) is to use the PHP ISAPI DLL rather than the executable. The cgi.force_redirect option does not apply to the DLL.

    I have attached the PHP installation instructions in case you don't have them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •