Bug #18000 Updated: localized http header request includes variable scope
| From: | rasmus@php.net | Date: | Wed, 26 Jun 2002 19:03:57 +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-12154@lists.php.net to get a copy of this message | ||
ID: 18000
Updated by: rasmus@php.net
Reported By: code@4arrow.com
Status: Bogus
Bug Type: Feature/Change Request
Operating System: UNIX
PHP Version: 4.1.2
New Comment:
But you still haven't answered why you are doing:
include 'http://samedomain/file.php';
This makes no sense to me. Why go through HTTP when the file is
local?
Previous Comments:
------------------------------------------------------------------------
[2002-06-26 15:00:31] code@4arrow.com
You're right about the additional load it would add and yes you can
pass variables via the Query string.
For me the feature request is more technical in nature than cosmetic
patches will cover.
When you execute a script and during its run I
include'http://samedomain/file.php' There
are limitations of scope that
are placed on the included local file in comparison to its parent file
which to me seems unecessary.
This ruins the code flow for me, practically and mentally.
I wonder if this is part of the child process limitation in PHP?
------------------------------------------------------------------------
[2002-06-26 14:50:04] rasmus@php.net
Oh, and to get your sessions to persist across a url file open, simply
pass your SID along.
------------------------------------------------------------------------
[2002-06-26 14:48:51] rasmus@php.net
I don't understand why you call this a header http request, but
whatever. So you want
include 'http://local.domain/file.php'
to act like
include 'file.php'
if local.domain happens to be the a local domain? Seems to me like
this is something that you should be checking at the application level.
Why use a url when the file is local? We could add a check, but it
would add extra dns calls to every url file operation and I don't think
it is worth it.
------------------------------------------------------------------------
[2002-06-26 14:38:34] code@4arrow.com
Rasmus the HTTP header request is used in all PHP methods that request
a file with a HTTP or full LINK even if it is local.
Such as fopen(), file(), readfile(), include, require, include_once,
require_once. All of these can include files with a absolute URI.
FYI, Sessions don't persist from one http session to another even
inside the same domain when one file is included within another via a
absolute url.
------------------------------------------------------------------------
[2002-06-26 14:31:22] rasmus@php.net
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.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/18000
--
Edit this bug report at http://bugs.php.net/?id=18000&edit=1