#19049 [NEW]: Variables go missing suddenly (not register_globals related!)
| From: | proton at fancreations dot com | Date: | Thu, 22 Aug 2002 15:02:49 +0000 |
| Subject: | #19049 [NEW]: Variables go missing suddenly (not register_globals related!) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-17548@lists.php.net to get a copy of this message | ||
From: proton@fancreations.com
Operating system: Windows XP Home
PHP version: 4.2.2
PHP Bug Type: Variables related
Bug description: Variables go missing suddenly (not register_globals related!)
I have this function I've been using to find a bug in my script, but that
now appears to be a bug in PHP itself:
function debug($msg)
{
echo '<b>DEBUG</b>: ' . $msg . '<br/>';
}
I have this function on a page with a form on it. When I call this
function when the form is not submitted yet, everything goes fine, but
when I call it when I have submitted the form, it goes fine a couple of
times but then it gives me this message, saying that the variable is
undefined:
Notice: Undefined variable: msg in f:\website\public_html\test\form.php on
line 51
Line 51 is the "echo '<b>'..." line in the function above.
I get simillar strange behaviour when I create a new object and then in
the object's constructor I access $this and it also gives me an undefined
variable error.
I get this behaviour with both Apache 2 (2.0.40) and Apache 1 (1.3.26),
with PHP versions 4.2.0 and 4.2.2. I haven't tested it on any other
versions, but I think it will behave the same.
Sometimes Apache 2 crashes on this, other times it would display the
errors. After having this a couple of times, my computer even restarts by
itself for some reason!
Apache 1 always displays the error message.
--
Edit bug report at http://bugs.php.net/?id=19049&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19049&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19049&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19049&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19049&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19049&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19049&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19049&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19049&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19049&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19049&r=globals