I'm using Windows NT4 with the Personal Web Server (PWS) and php 4.0.2 installed.

Most of the php commands seem to work but commands like:

$HTTP_USER_AGENT

Don't seem to want to work. Any suggestions?

Thanks

Owen

    If you are using the ISAPI module, you need to use $HTTP_SERVER_VARS["HTTP_USER_AGENT"] because HTTP_USER_AGENT is not an environment variable. If you switch to CGI though, $HTTP_USER_AGENT becomes an environment variable.

    Strange but true.

    John

    see:
    http://php.weblogs.com/apache_iis for more info.

      Thanks, that information was very helpful.

      Which mode is better?

      ISAPI or CGI mode?

        ISAPI is still considered somewhat experimental, but it has worked quite well for me, and MUCH faster than CGI mode.

        <:3)~~

          I have had strange slow-downs with ISAPI with PHP 4.02 after running for a while. Stick to CGI for production systems, or restart IIS every day with ISAPI.

          --Regards, John

            Avoid the ISAPI module ESPECIALLY if you are planning on working with PHP4's session handling features. The ISAPI module still has bugs in it and it seems the CGI (PHP.EXE) version is better tested at this point.

            I've been working on some security scripts involving session management, and though I'd much rather use the ISAPI module for all its purported benefits (faster, doesn't load/unload memory with each invocation in the same manner, etc.), I only run the CGI version at this point. Just my 2.2 cents worth. :-)

              Write a Reply...