[advanced search]
Results from the most recent live auction are here.
13 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 06-01-2008, 08:30 PM   · #1
RageD
Senior Member
 
Name: Dennis
Location: Joliet, Illinois
Trader Rating: (42)
Join Date: Apr 2005
Posts: 1,148
NP$: 69.10 (Donate)
RageD is a splendid one to beholdRageD is a splendid one to beholdRageD is a splendid one to beholdRageD is a splendid one to beholdRageD is a splendid one to beholdRageD is a splendid one to beholdRageD is a splendid one to behold
Child Abuse
[PHP Error] Undefined Index

Hmm. Ok. So I've been trying to get this to work. The script is IBS. I've got everything pretty much working except the login function is causing issues. MAJOR issues. Obviously, I can't login without it so here is the error I'm getting

Code:
108/5/1 10:27 errno: 8 str: Undefined index: key on file: /usr/local/ibs/interface/ibs/inc/login.php line :11 localtime() [<a href='function.localtime'>function.localtime</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead 108/5/1 10:27 errno: 8 str: Undefined index: value on file: /usr/local/ibs/interface/ibs/inc/login.php line :22 localtime() [<a href='function.localtime'>function.localtime</a>]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead


Here is the login function:
PHP Code:
function login($username,$password,$type)
{
    
$obj=new socket;
    
$ret=$obj->sockGet("login(auth_type={$type}\xffauth_name={$username}\x  ffauth_pass={$password}\xffauth_remoteaddr={$_SERV  ER["REMOTE_ADDR"]})",FALSE);
    if(!
is_array($ret))
    return array(
FALSE,"Internal error");
    if(
$ret["key"]=="login" and $ret["value"]=="OK")
    {
    
$pass=$obj->parseOutput($obj->sockRead());
    if(
is_array($pass) and $pass["key"]=="password")
        
$password=$pass["value"];
    
$_SESSION["auth_type"]=$type;
    
$_SESSION["auth_name"]=$username;
    
$_SESSION["auth_pass"]=$password;
    
$_SESSION["perms"]=array();
    return array(
TRUE,"");
    }
    return array(
FALSE,$ret["value"]);
}


Any help is great, thanks!

-RageD

By the way: The lines with the errors are:
if($ret["key"]=="login" and $ret["value"]=="OK") (for $ret["key"])
-and-
return array(FALSE,$ret["value"]); (for $ret["value"])

Ah! It was so simple, I don't know why I didn't see it before.

PHP Code:
$ret["key"] = "admin";
$ret["value"] = "OK";


Just add that before "if($ret["key"]...)" and worked like a charm! (Well had to do a similar procedure then in perms.php, but no big deal!)

-RageD


Please register or log-in into NamePros to hide ads

Last edited by RageD : 06-01-2008 at 08:33 PM.
RageD is offline   Reply With Quote
Reply

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
YUPPADS http://www.mobisitetrader.com/ Traffic Down Under
Advertise your business at NamePros
All times are GMT -7. The time now is 12:21 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0