#19049 [Com]: Variables go missing suddenly (not register_globals related!)
| From: | proton at fancreations dot com | Date: | Fri, 23 Aug 2002 07:51:04 +0000 |
| Subject: | #19049 [Com]: Variables go missing suddenly (not register_globals related!) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17615@lists.php.net to get a copy of this message | ||
ID: 19049
Comment by: proton@fancreations.com
Reported By: proton@fancreations.com
Status: Feedback
Bug Type: Variables related
Operating System: Windows XP Home
PHP Version: 4.2.2
New Comment:
With php4-win32-latest I still have the same problem, variables that go
undefined suddenly...
Previous Comments:
------------------------------------------------------------------------
[2002-08-22 17:21:32] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
There were some fixes lately which might be related.
------------------------------------------------------------------------
[2002-08-22 11:02:48] proton@fancreations.com
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 this bug report at http://bugs.php.net/?id=19049&edit=1