zend_hash_find() (bug in session.c?)

From: Date: Tue, 23 Apr 2002 10:35:13 +0000
Subject: zend_hash_find() (bug in session.c?)
Groups: php.dev 
Request: Send a blank email to php-dev+get-83205@lists.php.net to get a copy of this message
Hello, I have just upgraded to PHP 4.2.0 and straight away one of our custom PHP extenstions reported an error (couldn't get SCRIPT_NAME): Scripthash Security Extension - http://www.scl.co.uk/scripthash/ The reason for this seems to be that a global variable I need SCRIPT_NAME has been moved into the $_SERVER superglobal. As a quick, temporary fix I enabled register_globals in the .ini file, this worked fine. My next task was to find out how I should really do this so I had a look through some of the provided PHP extenstions and I noticed that session.c (and several other modules) was using the same method to fetch HTTP_REFERER and REQUEST_URI as I was using to fetch SCRIPT_NAME which is using the zend_hash_find() function. Does this mean that in order for the session extension to work properly register_globals has to be enabled or have I overlooked something. What method should I now be using to fetch variables inside the superglobals from with in my extension source code. I know I could use getenv() for this particular example but what is the alternative. Thank for you time Tom.

« previous php.dev (#83205) next »