ID: 20558 Updated by: [EMAIL PROTECTED] Reported By: chat_cha at hotmail dot com Status: Bogus Bug Type: Variables related Operating System: window 2000 PHP Version: 4.2.3 New Comment:
It has to do with your setup, specifically the register_globals directive. * http://www.php.net/support.php Previous Comments: ------------------------------------------------------------------------ [2003-08-04 15:22:32] niklas_u_f at bredband dot net hello i got a problem....I´m about to start my own webserver and domain name...but i´m just foling around now with windows 2000 server. so i can learn the software. but the problem is i get a error message : Notice: Undefined variable: REMOTE_ADDR in c:\inetpub\wwwroot\test\online\online.php on line 19 the code is in the online.php : <? ################################################## # Variablar $server = "xxxxxxxxx"; // mySQL servern. Oftast "localhost", testa annars "127.0.0.1" $databas = "xxxxxxx"; // Databasnamn $anvandare = "omc_swe"; // Användarnamn $losen = "xxxxxxx"; // Lösenord $tiden = time()-300; // Antal sekunder som varje IP skall behållas i databasen ################################################## # Script $conn_online = mysql_connect ("$server", "$anvandare", "$losen"); mysql_select_db ("$databas"); $klockan = time(); mysql_query("INSERT INTO online (klockan, ip) VALUES ('$klockan', '$REMOTE_ADDR')"); mysql_query("DELETE FROM online WHERE klockan < '$tiden'"); $antal = mysql_num_rows (mysql_query ("SELECT DISTINCT ip FROM online")); mysql_close($conn_online); if ($antal == 1) { echo "$antal aktiv besökare."; } else { echo "$antal aktiva besökare."; } ?> Please response to my e-mail please ------------------------------------------------------------------------ [2002-11-21 21:36:07] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php If you do not want to see notice warnings, set your error reporting level to E_ALL ^ E_NOTICE ------------------------------------------------------------------------ [2002-11-21 21:21:49] chat_cha at hotmail dot com Where test php code, show error that Notice: Undefined variable: [var_name] in [file_name.php] on line [name_line] How I can do for don't show this error message? Note : I use IIS for web server. Thanks ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20558&edit=1