php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5363 problem with class and HTTP_COOKIE_VARS
Submitted: 2000-07-04 20:26 UTC Modified: 2000-07-05 10:36 UTC
From: jorge at ctyd dot com dot mx Assigned:
Status: Closed Package: Other
PHP Version: 4.0.0 OS: Linux Red Hat 6.2
Private report: No CVE-ID: None
 [2000-07-04 20:26 UTC] jorge at ctyd dot com dot mx
 If i try to get the vaule of a cookie inside the class, the command
HTTP_COOKIE_VARS return "" but if the same command run outside the class
return the correct value

Example

Archivo userctl.inc
<? 

class userctl {
  
    function userctl() {
      print $HTTP_COOKIE_VARS["ctl_user_cookie"];    // return ""
    }

?>

Archivo test.phpA
<?
   include("./userctl.inc");
   $user = new userctl;
   print $HTTP_COOKIE_VARS["ctl_user_cookie"];    //return "value"
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-05 10:36 UTC] stas at cvs dot php dot net
Use global $HTTP_COOKIE_VARS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 23:01:30 2024 UTC