The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
|
Formtools not able to login with admin account - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Formtools not able to login with admin account (/showthread.php?tid=590) |
Formtools not able to login with admin account - 31special - Mar 22nd, 2010 Hello, I created a formtools database backup on Server A and I'm trying to restore the formtools database backup on Server B. The restoration runs succesfully and I can login to the database using the authorized user from a mysql console. The problem is that when I try to login to the Formtools application via the browser using the admin account or any other account the the page just refreshes and takes me to the login page again. The password is correct but it just refreshes the page and never lets me in. The following is the ssl_access_log: 192.168.8.62 - - [22/Mar/2010:12:41:05 -0400] "POST /formtools/index.php HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:05 -0400] "GET /formtools/admin/forms/ HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:05 -0400] "GET /formtools/logout.php HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:05 -0400] "GET /formtools HTTP/1.1" 301 312 192.168.8.62 - - [22/Mar/2010:12:41:05 -0400] "GET /formtools/ HTTP/1.1" 200 2528 192.168.8.62 - - [22/Mar/2010:12:41:14 -0400] "POST /formtools/index.php HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:14 -0400] "GET /formtools/admin/forms/ HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:14 -0400] "GET /formtools/logout.php HTTP/1.1" 302 - 192.168.8.62 - - [22/Mar/2010:12:41:14 -0400] "GET /formtools HTTP/1.1" 301 312 192.168.8.62 - - [22/Mar/2010:12:41:14 -0400] "GET /formtools/ HTTP/1.1" 200 2528 As you can see on the log, after entering the password it logs in then it logs out automatically. How can I fix this? RE: Formtools not able to login with admin account - Ben - Mar 22nd, 2010 Heya, It sounds like maybe PHP sessions aren't enabled on Server B. If you get booted out the moment you log in, that generally means that the page you were logged into couldn't find evidence of you BEING logged in, and threw you out again. One easy thing you could try is adding this line to your /global/config.php file: PHP Code: $g_session_type = "database"; That will tell Form Tools to use database sessions instead. That can sometimes get around problems with PHP sessions. - Ben RE: Formtools not able to login with admin account - 31special - Mar 23rd, 2010 This is what I found when trying to login on Server B, Formtools creates 5 sessions instead of only 1 inside /var/lib/php/session sess_1ju6jb8h1m8gvq7acsrd0j8ep0 ft|a:18:13:"login_user_id";s:1:"1";s:18:"login_account_type";s:5:"admin";s:15:"program_version";s:5:....................................... sess_8kr257d44gmbl52qt9ld9741i0 This one is empty sess_sqlj8napk8qcep499pnpuuan17 ft|a:0:{} sess_2ca6cjkai67susie05retoge44 ft|a:0:{} sess_p7p4107o2v7un9gr9vnf675te3 ft|a:0:{} On Server A it only creates only one session during login and it lets me in properly. When I log in on Server A it only creates 1 session which contains the same content as the session above sess_1ju6jb8h1m8gvq7acsrd0j8ep0 I added the $g_session_type = "database" in the config file and restarted apache but the Formtools is still saving session within /var/lib/php/session I checked the php.ini on Server A and Server B and they are the same. The formtools files are the same and the database is the same. What is causing this? RE: Formtools not able to login with admin account - Ben - Mar 27th, 2010 Fascinating...! This is clearly a session problem on server B. First, it should only create a single session. The first one you posted appears to contain a complete session but it looks like it then isn't able to access that session and then attempts to create more. I'm afraid this is very much out of my realm of expertise: I'm sure it's a server problem, but beyond that I'm in the dark. Sorry about that. If you figure out the cause, mind posting it here? - Ben |