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:

  1. session_start() called before. no need call again.
  2. there's no such variable $_session["uusertypeid"]. it's not set.
  3. the array @ $usertypedescr doesn't have 0 index. it's empty. if got database query, either failed or returned empty resultset.
  4. same 3.

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -