1 (edited by garthwimbush@gmail.com 10/22/2014 11:42:26 am)

Topic: Session logout every new page

Hi All,
I have FA installed on a Go-Daddy hosted Windows server. It has been trouble free for 6 months, but since about a month ago it is going back to the login screen every click. I did have version 2.3.19 installed, and upgraded to 2.3 22, but the problem remains. It doesn't seem to be the IP address changing regularly as was mentioned elswhere in the forum, but does see to be something GoDady has done (though they won't admit it). Nothing useful appears in the logs. Does anyone have any ideas?

Re: Session logout every new page

Maybe you need to check the session configuration in the server, I've encountered this because the session path must be explicitly written in the code.

Re: Session logout every new page

I uncommented:
ini_set('session.save_path', dirname(__FILE__).'/../tmp/');
in session.inc, and re-logged in, but the session is still terminating each click. The session files are appearing in the tmp directory.
Is this what you meant?

Re: Session logout every new page

Also, while I am taken back to the login screen on each new click, logging in again returns me to where i would have been after the click.

Re: Session logout every new page

Try to increase the Company Setup's Time out from 600 seconds to something bigger.

Re: Session logout every new page

apmuthu - I assume you are talking about the login timeout in the Company Setup page - I increased this to 1200, but it didn't help.

Re: Session logout every new page

Please check the config.php file for any missing entries that became available after your initial version was installed.

Also ss if you can hardcode the actual session path in your php.ini or since you are on a shared hosting platform see if a local php.ini overides file is possible.

Re: Session logout every new page

Session is not working . Check the sessions.inc and current_user.inc for more details,  especially the login functions and Session create functions.

Subscription service based on FA
HRM CRM POS batch Themes

Re: Session logout every new page

I admit to being a bit lost here. How can I put trace statements into the code to see where the flow goes? I tried print() here and there, but it never appears on the page. How do people normally debug this kind of thing?

Re: Session logout every new page

Use the debug flags in the config file.

Re: Session logout every new page

I solved this by commenting the following 2 lines in session.inc

        if ($_SESSION['IPaddress'] != $_SERVER['REMOTE_ADDR'])
            return false;

Re: Session logout every new page

I just did a fresh install of FA 2.4.7 and had this same problem.  I simply couldn't get the program to work correctly until I commented out the line in session.inc as shown:

        //if ($_SESSION['IPaddress'] != $_SERVER['REMOTE_ADDR'])
            //return false;

How can I get FA to work correctly without hobbling its security in this way?

Re: Session logout every new page

Are you running Chrome in incognito mode per chance?  If so, there isn't any session saved on the server.   Try using a different browser.  Does the problem occur in all browsers?  If so, you will have to trace down the problem.  Use print() followed by die() before the session/server check.