php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22169 Undefined variable
Submitted: 2003-02-11 10:10 UTC Modified: 2003-02-20 08:17 UTC
Votes:17
Avg. Score:4.3 ± 1.0
Reproduced:15 of 15 (100.0%)
Same Version:8 (53.3%)
Same OS:8 (53.3%)
From: jjeca at hotmail dot com Assigned:
Status: No Feedback Package: IIS related
PHP Version: 4.3.0 OS: Win 2k pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jjeca at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-02-11 10:10 UTC] jjeca at hotmail dot com
I read all your posts about the "Undefined variable" and I changed the php.ini global variable to On, but I still have that message when I want to referance a $submit variable!!!

Message is : 
Notice: Undefined variable: submit in "..." on line 4
I tested it with php3 and php4 --->same thing

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-11 10:20 UTC] iliaa@php.net
run phpinfo() to make sure your register_globals (I assume that is the option you are referring to) is enabled.
 [2003-02-11 10:37 UTC] jjeca at hotmail dot com
YES, register_globals is On!
 [2003-02-11 10:48 UTC] philip@php.net
There are times when submit buttons don't pass values. I always forget the exact circumstances so rarely rely on them but anyway, assuming this is a post form, do:

var_dump(array('p' => $_POST, 'r' => ini_get('register_globals')));

Of course, use $_GET for GET.
 [2003-02-20 08:17 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-06-10 17:26 UTC] DontGiveOut at BecauseOfBots dot com
I am attempting to port an existing app from php 4.2.2 linux (apache) to Windows XP (iis 5.1) php 4.3.2 -> I do have register globals turned on but I am still getting the Underfined variable messages on any session vars.  Any one else encounter this problem?

Thanks!
 [2004-01-09 12:05 UTC] parkhurst at mac dot com
I am having the same problem.  I have a PC running Windows XP Pro and it has PHP 4.3.4.  It is really annoying.  Someone posted that they downgraded to 4.0.6 and it fixed the problem.  Here is a test I ran on it and the results....

I created a file called "temp.php":
---
<?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>
---

Here is the error it returns...and yes register_globals is "On".  It does nothing to help the issue....
---
Notice: Undefined variable: text in d:\---filepath---\temp.php on line 1
 [2004-01-21 18:31 UTC] tree_porcupine at hotmail dot com
I have a site residing on my development server (debian/linux) that works flawlessly.  On porting it over to a windows server (same version everything), I keep getting these undefined errors.  What can I do about this?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC