PHP MySQL Session -
we moved our website new server came new ip address. puzzles me; website login sessions not work on new server when change database ip old server working.
mysql version
- old server = 5.1.58- community
- new server = 5.1.68 - community
at first thought php error believe it's not , suspect mysql related. knows might have caused conflict?
debugging error
notice: session had been started - ignoring session_start() in c:\inetpub\wwwroot\gtest\libs\products.php on line 2 notice: undefined index: uusertypeid in c:\inetpub\wwwroot\gtest\admin\index.php on line 50 notice: undefined offset: 0 in c:\inetpub\wwwroot\gtest\admin\index.php on line 52 notice: undefined offset: 0 in c:\inetpub\wwwroot\gtest\admin\index.php on line 52
line 50
getusertype($_session['uusertypeid'], $usertypeid, $usertypedescr, $active_tag);
line 52
if (($usertypedescr[0] == 'admin') || ($usertypedescr[0] == 'report'))
let's go through notices in order:
session_start()
called before. no need call again.- there's no such variable
$_session["uusertypeid"]
. it's not set. - the array @
$usertypedescr
doesn't have0
index. it's empty. if got database query, either failed or returned empty resultset. - same 3.
Comments
Post a Comment