ID: 20837
Comment by: papercrane at reversefold dot com
Reported By: webmaster at vop dot com
Status: Bogus
Bug Type: *General Issues
Operating System: Windows XP professional
PHP Version: 4.2.3
New Comment:
I'm sure this is about to be set bogus as this isn't an error with
PHP.
That's a Notice, first of all, not an error. A Notice is just for your
own enlightenment. The problem is that you're using a variable that's
not defined and that generates a notice. You can fix this in one of a
multitude of ways. The first and easiest is to turn off notices. In
your php.ini file, set
error_reporting = E_ALL & ~E_NOTICE
This will stop notices from being displayed, but this will just stop
the symptom.
The better way is to use this in your script:
if(!isset($text)) { $text = 'blah'; }
Please refrain from posting bugs unless you KNOW FOR CERTAIN that it is
a bug. It is much better to post to a newsgroup or mailing list for
help rather than submitting a bug (as normally, you get NO help when
submitting a bogus bug).
See http://www.php.net/support.php
Previous Comments:
------------------------------------------------------------------------
[2004-01-09 12:00:28] parkhurst at mac dot com
Some more notes about the issue. Even if I have a script as simple as
this it will not work properly.
---
<?php if (!$text) { $text = "Enter Text Here"; } ?>
<form action="temp.php" method="post" enctype="multipart/form-data"
name="form1">
<input name="text" type="text" id="text" value="<?php echo $text;
?>">
<input type="submit" name="Submit" value="Submit">
</form>
---
This is the error message it gives me. I see that there are a number
of reports of similar problems. Here is the error message it
returns....
Notice: Undefined variable: text in d:\---filepath---\temp.php on line
1
------------------------------------------------------------------------
[2004-01-09 11:54:23] parkhurst at mac dot com
I am having the same issue and changing register_globals to "On" does
not help. The OS is Windows XP Professional and I have PHP 4.3.4.
For now I am just going to downgrade to 4.0.6 because I can't work with
this issue it is becoming a big problem.
------------------------------------------------------------------------
[2002-12-05 15:29:20] [EMAIL PROTECTED]
In PHP 4.2.0, the 'register_globals' setting default changed to
'off'. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
------------------------------------------------------------------------
[2002-12-05 15:20:53] webmaster at vop dot com
I downloaded the latest PHP version hoping that it will work, but
everytime I try to run PHP script it won't run, it will say undefined
variable,
especially when I use form, when I clicked submit the php won't
recognize the variable from the form.
I unstalled the 4.2.3 and installed the 4.06 and the problem solved.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20837&edit=1