Bug #18000 Updated: localized http header request includes variable scope
| From: | code at 4arrow dot com | Date: | Wed, 26 Jun 2002 19:15:59 +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-12157@lists.php.net to get a copy of this message | ||
ID: 18000
Updated by: code@4arrow.com
Reported By: code@4arrow.com
Status: Bogus
Bug Type: Feature/Change Request
Operating System: UNIX
PHP Version: 4.1.2
New Comment:
Specifically, for me as I said it is about code flow and options.
Really as simple as that. Having the ability to include a file with its
full URI that makes a new header request without losing variable scope
(locally) of the previous header request it is inside of would be
beneficial to me and my php development by allowing me to gain more
freedom and options.
Options I think is the key word that this would create for me.
Variables give me options losing them in middle of a run takes away my
options.
If there were to be any considertion for something like this, I would
suggest a PREFIX optional argument that would prepend the newly created
ENV variables from the new and second header request within the same
domain.
Maybe you're not clear on what I am suggesting.
I am requesting the ability to include a full URL and a new header
request within an existing header request on the same domain, same
script execution run, that enables me to have two or more sets of
unique and shared variables without losing variable scope.
Previous Comments:
------------------------------------------------------------------------
[2002-06-26 15:03:57] rasmus@php.net
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?
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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