Maybe they should have mentioned $HTTP_RAW_POST_DATA or php://stdin hfuecks at phppatterns dot com 06-Sep-2004 03:21 Using Apache/mod_ssl, there are further environment variables available to check for an SSL connection (can be more useful than $_SERVER['SERVER_PORT']), documented here: http://www.modssl.org/docs/2.8/ssl_reference.html#ToC25 To test whether the client connected with SSL I can use $_SERVER['HTTPS'] e.g (with redirect to secured, current URL); <?php if ( !isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != 'on' ) { header ('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); exit(); } ?> boaz at babylon dot com 30-Aug-2004 10:13 You can add $_SERVER["DOCUMENT_ROOT"] to IIS by editing the Environment Variables of your Windows server (was tested on WinXP SP2). Right click on My Computer >> Properties >> Advanced. In the System variables click on 'New' and Type in the name field 'DOCUMENT_ROOT' and in the value field the path to your IIS document root folder. Don't forget to restart your Windows (IIS restart won't load the new settings). david at grant dot org dot uk 12-May-2004 08:34 $_SERVER['DOCUMENT_ROOT'] *is* supported by IIS, although only when running PHP as an ISAPI module. youdontmeanmuch [at] yahoo.com 06-Apr-2004 12:20 Be carful when using $_SERVER['DOCUMENT_ROOT']; in your applications where you want to distribute them to other people with different server types. It isnt always supported by the webserver (IIS). mortoray at ecircle-ag dot com 19-Dec-2003 01:32 The RAW / uninterpreted HTTP POst information can be accessed with: $GLOBALS['HTTP_RAW_POST_DATA'] This is useful in cases where the post Content-Type is not something PHP understands (such as text/xml). josh,endquote,com 04-Dec-2003 07:54 Running PHP 4.3 under IIS 5 on Windows XP, there is no $_SERVER['REQUEST_URI'] variable. This seems to fix it: if(!isset($_SERVER['REQUEST_URI'])) { $_SERVER['REQUEST_URI'] = substr($_SERVER['argv'][0], strpos($_SERVER['argv'][0], ';') + 1); } |