note 89883 added to reserved.variables.server

From: Date: Thu, 26 Mar 2009 23:15:22 +0000
Subject: note 89883 added to reserved.variables.server
Groups: php.notes 
Request: Send a blank email to php-notes+get-152503@lists.php.net to get a copy of this message
It is also useful to note, that if you are using Apache rewrite (to manipulate random URI paths to a core php file that runs your CMS), and you are in SSL mode, browsing with IE (6 or 7), $_SERVER["REQUEST_URI"] has odd properties. If you save that variable to a session, e.g. $_SESSION["last_page"] = $_SERVER["REQUEST_URI"]; And then you try to access that session variable on the next page, the variable will have mysteriously changed. Notably, a part of the path will be missing, and in it's place will be the string "/://0", e.g. Original Variable: /site/admin/menu/edit/ Retrieved from Session: /site/admin/menu/://0 I would very much like to know why, but I couldn't find this behavior documented anywhere. It also affects, $_SERVER["REDIRECT_URL"]. My work around for now, is to avoid using a SESSION to store the current page, and instead use the $_SERVER["HTTP_REFERER"]. But then I have to strip out the protocol and domain to get the part that I want. If anyone knows the reason for this, can you email me? ---- Server IP: 64.71.164.2 Probable Submitter: 24.4.140.223 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php Edit -- https://master.php.net/note/edit/89883 Del: integrated -- https://master.php.net/note/delete/89883/integrated Del: useless -- https://master.php.net/note/delete/89883/useless Del: bad code -- https://master.php.net/note/delete/89883/bad+code Del: spam -- https://master.php.net/note/delete/89883/spam Del: non-english -- https://master.php.net/note/delete/89883/non-english Del: in docs -- https://master.php.net/note/delete/89883/in+docs Del: other reasons-- https://master.php.net/note/delete/89883 Reject -- https://master.php.net/note/reject/89883 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#152503) next »