php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18678 Undefined variable - ERROR
Submitted: 2002-07-31 14:33 UTC Modified: 2002-07-31 14:44 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: Josh at halodezigns dot com Assigned:
Status: Not a bug Package: *Web Server problem
PHP Version: 4.2.1 OS: web server
Private report: No CVE-ID: None
 [2002-07-31 14:33 UTC] Josh at halodezigns dot com
I have a email form on my website and i've looked everwhere for help with this php code.

When the sever i use was updated with php version 4.2.1 the form no longer worked and gave me the following error:

error log:

[Wed Jul 31 09:35:29 2002] [error] PHP Notice:  Undefined variable:  REMOTE_ADDR in /home/halo/sendmail.php on line 16
[Wed Jul 31 09:35:29 2002] [error] PHP Notice:  Undefined variable:  action in /home/halo/sendmail.php on line 21

PLEASE HELP

Josh@HaloDezigns.com

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-31 14:36 UTC] Josh at halodezigns dot com
One more thing, The lines of code are as follows:

15 - // Gets the IP Address
16 - if ($REMOTE_ADDR == "") $ip = "no ip";
17 - else $ip = getHostByAddr($REMOTE_ADDR);
18 - 
19 - //Process the form data!
20 - // and send the information collected in the Flash form to Your nominated email address
21 - IF ($action != "")
 [2002-07-31 14:44 UTC] nohn@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
be 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.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 16 16:03:37 2021 UTC