Enuf Posted January 5, 2011 Posted January 5, 2011 Ok, i've used wamp before many times. I've even used it before for MCCodes. But now im getting an error? Before i was on XP though now im on windows 7. Notice: Undefined index: HTTP_X_FORWARDED_FOR in C:\wamp\www\header.php on line 110 Notice: Undefined index: attacking in C:\wamp\www\header.php on line 119 That's the error. This is from lines 106 - 124 } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) <- 110 error. ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) <- 119 error { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } Quote
Dominion Posted January 5, 2011 Posted January 5, 2011 change $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; to $IP = $_SERVER['REMOTE_ADDR']; and if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) to if($dosessh && (isset($_SESSION['attacking']) || $ir['attacking'])) I assume you turned error reporting on and/or updated your php version. No idea what $dosessh or $ir['attacking'] is for, however ^ should fix it. Errors have always been there wait until you look around your test site. :whistling: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.