PHP 4.0 Bug #8062 Updated: $HTTP_COOKIE_VARS
| From: | zak@php.net | Date: | Fri, 01 Dec 2000 21:28:55 +0000 |
| Subject: | PHP 4.0 Bug #8062 Updated: $HTTP_COOKIE_VARS | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39806@lists.php.net to get a copy of this message | ||
ID: 8062
Updated by: zak
Reported By: sam@samware.net
Status: Feedback
Bug Type: Variables related
Assigned To:
Comments:
Globally-scoped variables are not imported into the namespace of a class by default.
Globally-scoped variable must be imported into local scopes (like class and function definitions)
using the globals keyword.
This is not a bug - it is simply the way that the language works.
At 03:05 PM 12/1/00 -0600, you wrote:
> I have more details. The problem only occurs within a
> Class method. To correct the problem I used:
>
> global $HTTP_COOKIE_VARS;
>
> It is my understanding that $HTTP_COOKIE_VARS should
> already be global as is $HTTP_SERVER_VARS etc...
>
> Regards,
> Sam Beckwith
Previous Comments:
---------------------------------------------------------------------------
[2000-11-30 21:32:58] sniper@php.net
$HTTP_COOKIE_VARS is working just fine for me.
Please add some example code in which it doesn't work right.
--Jani
---------------------------------------------------------------------------
[2000-11-30 18:52:12] sam@samware.net
I am using PHP 403pl1 with Apache 1.3.14. Everything works great except for $HTTP_COOKIE_VARS. It
never returns a value. I can retrieve the value via $GLOBALS but I would prefer to stick with
$HTTP_COOKIE_VARS. This worked fine until I installed 403pl1 :)
I would be glad to supply more info if needed.
Regards,
Sam Beckwith
sam@samware.net
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8062