Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

Session expires automatically

Links for php scripts

Moderators: macek, egami, gesf

Session expires automatically

Postby swati1231 » Wed Jun 08, 2011 4:31 am

I have been facing a very strange issue since last few days. Whenever I sign-in in the back-end of the website and after that navigate the front end, I automatically logged out of the back end.

I have been running the same copy of the website on the development server and it is working fine but it is creating the above issue on the production server. I have also checked phpinfo where in sessions are enabled.

Anybody has any idea that what can be the exact issue? Is there any prerequisite list for sessions that I need to check?

Thanks
swati1231
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Aug 31, 2010 12:28 am

Re: Session expires automatically

Postby johnj » Wed Jun 08, 2011 5:15 am

It could be that your back-end session variables are getting reset when you navigate using your front-end. print the variables that keeps your session and make sure if this is the reason...
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Session expires automatically

Postby swati1231 » Wed Jun 08, 2011 5:29 am

Hi john, thanks for the reply.

As I have already mentioned that I am using the same code in development environment and it is working fine but it is not working in the production environment. I am wondering if it has to do anything with the server settings or anything that I need to change in php.ini???
swati1231
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Aug 31, 2010 12:28 am

Re: Session expires automatically

Postby johnj » Sun Jun 12, 2011 3:15 am

Cannot comment - need to debug. You may want to compare the php.ini file of development and production to find the difference.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Session expires automatically

Postby naseer89 » Tue Jun 21, 2011 11:39 pm

It need debugging..
Is it possible that you show your code...
User avatar
naseer89
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Jun 10, 2011 9:56 pm


Return to PHP Scripts

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.