Page 1 of 1

[SOLVED]Problem with admin area

Posted: Wed Apr 04, 2012 8:30 pm
by sasha2002
I enabled debug mode and on site.com/admin/login.php see :

Notice: Undefined index: PHP_AUTH_USER in /home/user/public_html/lib/classes/class.usertagoperations.inc.php(243) : eval()'d code on line 3
Notice: Undefined variable: SERVER_NAME in /home/user/public_html/lib/classes/class.usertagoperations.inc.php(243) : eval()'d code on line 10

I didn't understood why you use eval() ????

Can someone help me with this?

P.S.
I setup some events to mail me when someone enter in admin area
LoginPost and LoginFailed if someone try to exploit me ;)

Re: Problem with admin area

Posted: Wed Apr 04, 2012 10:21 pm
by Jos
sasha2002 wrote:/home/user/public_html/lib/classes/class.usertagoperations.inc.php
I think this indicates there is an error in one of your "User Defined Tags (UDT)" ?

Re: Problem with admin area

Posted: Wed Apr 04, 2012 10:24 pm
by sasha2002

Code: Select all

$agent = $_SERVER['HTTP_USER_AGENT'];
$uri = $_SERVER['REQUEST_URI'];
$user = $_SERVER['PHP_AUTH_USER'];
$ip = $_SERVER['REMOTE_ADDR'];
$ref = $_SERVER['HTTP_REFERER'];
$dtime = date('r');
$entry_line = "$dtime - IP: $ip | Agent: $agent | URL: $uri | Referrer: $ref | Username: $user n";

$messagez="Succesful Login to Admin Area at ".$dtime."\nPlease Check it ASAP\n".$agent."\n".$uri."\n".$user."\n".$ip."\n".$ref."\n".$entry_line;
mail("email@gmail.com", "Succesful Admin Login", $messagez, "From: alert@Domain\r\n"."Reply-To: alert@Domain\r\n"."X-Mailer: PHP/");
This is code, what's wrong?

Re: Problem with admin area

Posted: Wed Apr 04, 2012 10:30 pm
by Jos
http://nl.php.net/manual/en/reserved.va ... server.php
$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here.