Topic: Timeout issues

I am constantly being redirected to the login screen when I use the application (in less than one minute).
Sometimes the login screen covers the whole page, sometimes the menu and the footer shows up and the login screen is in the middle (seems that each section has it's own session and expiry time).

The login timeout in the setup/company setup menu is set to 1200.

The system is unusable, I can't enter a journal entry: it times out before I manage to save.

Any suggestions?

My environment consists of:
FrontAccounting Version 2.3.16 Build 08.05.2013
PHP Version 5.3.15
Safari Version 6.0.5 (7536.30.1)
Mac OS X Lion 10.7.5 (11G63)
MySQL 5.5.28

I would appreciate any input.
TIA
Ion

Re: Timeout issues

Could your server could be purging the sessions too aggressively? Or does your client's IP address change? Apparently that can be the case if you're connecting with a mobile device.

Re: Timeout issues

I am running everything on localhost so there should be no issues with the client address change. My URL is always (http://localhost/frontaccounting).

How can I determine if the server is purging the sessions to aggressively? What parameters are determining the purging of the session? I am aware of 2 right now, login timeout and the client's ip address but those don't explain the current behaviour. How can I debug this? BTW, I am using Apache/2.2.22.

One change I made that seems to help, in the frontaccounting/includes/session.inc, in the regenerateSession() function, I changed:
        $_SESSION['EXPIRES'] = time() + 10;
to
        $_SESSION['EXPIRES'] = time() + 100;

However, I am not sure if this is a good idea. Obviously it will be overwritten with an upgrade.
Ion

P.S.: If I have the login timeout at 1200 will the session expire after 1200s from login regardless of activity or only after 1200s of inactivity (no HTTP requests to the server)?

Re: Timeout issues

I did have a similar issue on a local Ubuntu server, where there is a cron job (/etc/cron.d/php5) removing old sessions every 30 minutes.

On Ubuntu (at least) this makes FA's login timeout value largely irrelevant as there is an external script purging sessions according to its own settings without FA ever knowing about it.

I got it sorted by increasing the session.gc_maxlifetime variable in php.ini. (Note that there may be more than one such file, as the main config file can be overridden by an application's own php.ini. And if you have the PHP CLI package installed, it also has its own php.ini. On a local server, with no other PHP applications, you can safely apply the change to all of them.)

I don't know if this applies to the Mac versions, but it could be worth looking into.

Re: Timeout issues

The only php.ini that I have on my machine is in /etc/php.ini and it reads:
session.gc_maxlifetime = 1440
Ion

Re: Timeout issues

I installed FA and have the same experience.  Each link I have to login.  The system is unusable (until the issue is fixed).

This is a bug need to be fixed.  I have used many php system and I have never encounter such session timeout issue.

My webhost is godaddy.  I have made the changes to the session.inc based on what I have read from the forum but none resolve the problem.

I will wait for godaddy's support to get back to me if they are able to find anything I will share...

KH

Re: Timeout issues

I'm having a similar problem on a new install, downloaded today.

I'm running FA on a WAMP server downloaded from bitnami.com/stack/wamp (v5.4.22) this is running on Win7 ultimate 64bit. This server is on my home LAN and I'm running the UI in Chrome from my laptop.

From the above comments...
my ip addresses are statically set

php.ini:
session.gc_maxlifetime = 1440
session.save_path = "E:/BitNami/WAMPST~1.22-/php/tmp"

looking in the save_path folder there a lots of files in there a few hours old, so i don't think that's being garbage collected.

I'll try the tweak ion suggested...

Re: Timeout issues

Ion's tweak didn't work for me.

I don't know if it's related but the time in the footer is -8 hours, i.e. PST timezone instead of GMT. I'll try setting the company timeout to 29400 seconds, i.e. 8 hours 10 minutes.

Re: Timeout issues

A little change in php.ini and a restart of apache httpd has fixed the datetime. I'll see if i still get timeouts later.

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone = "America/Los_Angeles"
date.timezone = "Europe/London"

Re: Timeout issues

Still going back to the login screen, but I've seen a different timeout screen, i.e. "Inactivity timeout" which is not the screen I'm seeing while using the software.

This is pointing me to some flaw in the session manager, it seems sometimes it drops the session and fires the login page again. As ion said above "sometimes the menu and the footer shows up" so it sometimes drops the session while the page is rendering.