Bug #18000 Updated: localized http header request includes variable scope

From: Date: Wed, 26 Jun 2002 18:31:23 +0000
Subject: Bug #18000 Updated: localized http header request includes variable scope
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12145@lists.php.net to get a copy of this message
ID: 18000 Updated by: rasmus@php.net Reported By: code@4arrow.com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: UNIX PHP Version: 4.1.2 New Comment: This made absolutely no sense to me. If someone else can make sense of this, feel free to unbogus it. What in the world do you mean by, "A PHP file that includes a local file via a HTTP header request" ? As in header('Location: http://local.domain/file.php') ? That is a client-side redirect which means the remote browser is going to make a completely separate request which may or may not come back to the same process or even the same physical server in a load-balanced architecture. Expecting any sort of variable persistency across client-side redirects is rather silly. This is what sessions are for. Previous Comments: ------------------------------------------------------------------------ [2002-06-26 14:17:27] code@4arrow.com A PHP file that includes a local file via a HTTP header request usign the full and absolute local URL (http and domain) is seen as a local call from with the server and treated as a separate session and PHP parser run from the existing PHP run that the include is beign requested within. This changes the $_SERVER['REMOTE_ADDR'] variant to the $_SERVER['SERVER_ADDR'] variant which is technically accurate but practically useless. Also all exisitng sessions or cookies are no longer available to the included local file because calling it via a absolute URI caused a http header request which I suppose creates a new session and extraneous server load. How about viewing absolute URIs in their context, if they are on the same domain/server to bear that in mind for the benefit of the developer? Now, I understand the need for a unique header request to reset new env variables but at the same time options are a good thing. How about both? A full URI can call both a local php file that retains the variables scope of its parent as well as one that doesn't or even better yet a new unique version prefix is added to the new HTTP header request and its created env variables and it is not viewed in isolation but as a part of an existing process. The request feature is to be able to call a absolute URL http://4arrow.com/test/test/php within an existing PHP script both on the same domain name and server name that has access to all the preset variables above it as well as unique variables within as a new unique HTTP request, lastly after it all variables from before it are also still available. Basically to retain the variable scope across absolute HTTP requests within local scripts that call local uris. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18000&edit=1

« previous php.bugs (#12145) next »