The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Getting logged out constantly... - 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: Getting logged out constantly... (/showthread.php?tid=223)



Getting logged out constantly... - weaver - Jul 24th, 2009

I'm pretty stumped by this one: I'm constantly getting logged out.

For instance, I log in, click on "clients", and am logged out, with the message: "No user account ID was found in sessions. Please log in again below."

If I click on "modules" same thing. Randomly adding a form, same thing.

The next bit of strangeness: When I log in, sometimes it takes five or six tries before it works.

Very strange. Anyone seen this before?

Platform Type
Debian
MySQL Version
5.0.45
PHP Version
5.2.5


RE: Getting logged out constantly... - Ben - Jul 25th, 2009

Hi Weaver,

Yes, I've encountered this a few times, but the inconsistent nature of the problem IS rather odd! Here's a couple of possible causes:

1. Are you running Suhosin - the hardended PHP project? (check your phpinfo() and do a search fo suhosin). That can limit the amount of information you can store in sessions, which can cause Form Tools to think that you're not actually logged in, and boot you out.

2. You accidentally changed the "sessions timeout" user account setting to something really low. I've done this in the past and it took me an embarrassing amount of debugging to realize that I had the brain the size of a walnut.

But in terms of a solution... try switching to use database sessions. Worth a shot. Just add this line to your config.php file:

PHP Code:
$g_session_type "database"

Let me know how it goes!

- Ben


RE: Getting logged out constantly... - weaver - Jul 26th, 2009

Suhosin doesn't show in phpinfo().

The "sessions timeout" was set at 5, I've since tried changing it to 999 to no effect.

Added php line my global/config.php file, and got a blank admin screen. Is there more to setup for this to work?

Oddly enough, I created a client login, and that doesn't seem to have any problems. (It has a pretty drastically reduced set of menu options though...they can only view the form[/align].)


RE: Getting logged out constantly... - Ben - Jul 26th, 2009

Yeah, this definitely sounds like a sessions problem. When client accounts log in, they have less information stored in sessions (less info to see & far less complex!). It looks like there's a limit to the amount of info that can be stored in sessions. There may well be something else installed besides suhosin that's doing this.

If you like, send me a PM with a link to your phpinfo() and I'll give it a look over!

w.r.t. the database sessions, no - it should work without any further configuration. Who's your hosting provider, by the way? It's not iPowerWeb is it?

- Ben


RE: Getting logged out constantly... - weaver - Aug 20th, 2009

Got distracted, but am now back to debugging this issue, here's what I found. In your session_start.php file, it's written as:

Code:
if ($g_session_type == "database")
  $sess = new SessionManager();

if (!empty($g_session_save_path))
    session_save_path($g_session_save_path);

session_start();
header("Cache-control: private");
header("Content-Type: text/html; charset=utf-8");

$folder = dirname(__FILE__);

require_once("$folder/library.php");

As written, the config.php file is never loaded until AFTER the session has already been created. Hence, adding the line you mentioned to my config.php didn't actually switch it to database sessions.

By re-ordering things like this:

Code:
$folder = dirname(__FILE__);
require_once("$folder/library.php");

if ($g_session_type == "database")
    $sess = new SessionManager();

if (!empty($g_session_save_path))
    session_save_path($g_session_save_path);

session_start();
header("Cache-control: private");
header("Content-Type: text/html; charset=utf-8");

...I'm ensured that the config.php file is read, and my setting is used. Database sessions seem to now work correctly, and I am no longer logged out at random.

At this point I just wanted to run this solution past you to check if you can see any potential problems with this re-arrangement.


RE: Getting logged out constantly... - Ben - Aug 21st, 2009

Weird. I change this a long while back; I'm going to have to look it over to figure out why it's organized with the require_once at the bottom.

No, that shouldn't cause any problems at all! If I find out something about why I ordered it that way I'll let you know. The only problem will be with upgrading: that file will be overwritten.

- Ben