#19049 [Com]: Variables go missing suddenly (not register_globals related!)
| From: | proton at fancreations dot com | Date: | Sat, 24 Aug 2002 15:31:25 +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-17762@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.3.0-dev
New Comment:
The code which I'm using is over 50 kb of classes. I will try to remove
parts of the code which are not used next week and then create a small
test script, but I'm a little busy right now.
Previous Comments:
------------------------------------------------------------------------
[2002-08-23 07:45:01] sniper@php.net
Can you give us a complete but short script? (that one function alone
is not one :)
------------------------------------------------------------------------
[2002-08-23 03:51:04] proton@fancreations.com
With php4-win32-latest I still have the same problem, variables that go
undefined suddenly...
------------------------------------------------------------------------
[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