php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19512 PHP 4.2.3 crashes with use of certain variables, unless unset
Submitted: 2002-09-20 01:03 UTC Modified: 2002-09-20 18:06 UTC
From: v at paid1 dot com Assigned:
Status: Closed Package: Variables related
PHP Version: 4.2.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: v at paid1 dot com
New email:
PHP Version: OS:

 

 [2002-09-20 01:03 UTC] v at paid1 dot com
Here is the code that crashes:
   global $HTTP_COOKIE_VARS;
   $cvar=$HTTP_COOKIE_VARS["user_name"];
   ...so far, everything works OK.  But after some more code that uses $cvar, like: if (empty($cvar)), etc, PHP crashes and I get Page Not found!
   I was able to fix this, by simply adding unset() like this:
   global $HTTP_COOKIE_VARS;
   $cvar=$HTTP_COOKIE_VARS["user_name"];
   unset($HTTP_COOKIE_VARS["user_name"]);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-20 02:45 UTC] sander@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2002-09-20 18:06 UTC] v at paid1 dot com
Sorry, my mistake.  It wasn't a PHP bug, but an error in my coding!  There was a loop where a function called itself again and again infinitely until the script simply quits... Sorry about that, now I have fixed it.  Please erase this bug report. Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Sep 19 20:01:33 2020 UTC