Your session has expired. Please log in again

Joomla version 1.5 is end-of-life and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Oleg-A
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jan 09, 2009 1:14 pm

Your session has expired. Please log in again

Post by Oleg-A » Sat Jan 10, 2009 5:47 pm

If I login->logout and then try to login again, an error message appears:

Code: Select all

Your session has expired. Please log in again
this errors appears as well as on the simple login (sometimes).
This problem came after the upgrade from 1.5.8 to 1.5.9

SQL queries from the page with "Your session expired" error (tried to login from frontend):

Code: Select all

#
SELECT *
  FROM sh10_session
  WHERE session_id = 'b9f73d4d950af5f43621a41f78082d5e'
#
DELETE
  FROM sh10_session
  WHERE ( time < '1231608598' )
#
SELECT *
  FROM sh10_session
  WHERE session_id = 'b9f73d4d950af5f43621a41f78082d5e'
#
UPDATE `sh10_session`
  SET `time`='1231609498',`userid`='0',`usertype`='',`username`='',`gid`='0',`guest`='1',`client_id`='0',`data`='__default|a:9:{s:15:\"session.counter\";i:1;s:19:\"session.timer.start\";i:1231609498;s:18:\"session.timer.last\";i:1231609498;s:17:\"session.timer.now\";i:1231609498;s:22:\"session.client.browser\";s:81:\"Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.0.5) Gecko/2008122115 Firefox/3.0.5\";s:8:\"registry\";O:9:\"JRegistry\":3:{s:17:\"_defaultNameSpace\";s:7:\"session\";s:9:\"_registry\";a:1:{s:7:\"session\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:4:\"user\";O:5:\"JUser\":19:{s:2:\"id\";i:0;s:4:\"name\";N;s:8:\"username\";N;s:5:\"email\";N;s:8:\"password\";N;s:14:\"password_clear\";s:0:\"\";s:8:\"usertype\";N;s:5:\"block\";N;s:9:\"sendEmail\";i:0;s:3:\"gid\";i:0;s:12:\"registerDate\";N;s:13:\"lastvisitDate\";N;s:10:\"activation\";N;s:6:\"params\";N;s:3:\"aid\";i:0;s:5:\"guest\";i:1;s:7:\"_params\";O:10:\"JParameter\":7:{s:4:\"_raw\";s:0:\"\";s:4:\"_xml\";N;s:9:\"_elements\";a:0:{}s:12:\"_elementPath\";a:1:{i:0;s:60:\"/www/sh10/www/htdocs/libraries/joomla/html/parameter/element\";}s:17:\"_defaultNameSpace\";s:8:\"_default\";s:9:\"_registry\";a:1:{s:8:\"_default\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:9:\"_errorMsg\";N;s:7:\"_errors\";a:0:{}}s:13:\"session.token\";s:32:\"2710328ebdf339b94779a53e0473dc32\";s:17:\"application.queue\";a:1:{i:0;a:2:{s:7:\"message\";s:97:\"Your session has expired. Please log in again\";s:4:\"type\";s:7:\"message\";}}}'
  WHERE session_id='b9f73d4d950af5f43621a41f78082d5e'
If I refresh the page, everything works ok.

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Your session has expired. Please log in again

Post by dpacadmin » Sun Jan 11, 2009 12:29 am

Are you using the default Joomla login module or some other login? Are you having any other problems with your site? Are you using the Joomla cache setting? Have you tried a different browser or deleting your browser's temp files?

Oleg-A
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jan 09, 2009 1:14 pm

Re: Your session has expired. Please log in again

Post by Oleg-A » Sun Jan 11, 2009 8:14 am

I use default login module.
Cache is disabled.
I tried with two different browsers with deleting all browser's temp files.

There was another problem after the upgrade to 1.5.9:
after login, there are no redirection to the previous page, instead of this, it shows the page with "User Details".
I found solution on this forum:
in components/com_user/controller.php, comment or remove:

Code: Select all

if(!JError::isError($error))
		{
			// Redirect if the return url is not registration or login
			if ( ! $return ) {
				$return	= 'index.php?option=com_user';
			}

			$mainframe->redirect( $return );
		}
		else
		{
			// Facilitate third party login forms
			if ( ! $return ) {
				$return	= 'index.php?option=com_user&view=login';
			}

			// Redirect to a login form
			$mainframe->redirect( $return );
		}
after, add

Code: Select all

$jackieURL =& JFactory::getURI();
$jackieURL = $jackieURL->toString();
$mainframe->redirect($jackieURL);

zbabyface
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Sep 19, 2008 4:16 pm

Re: Your session has expired. Please log in again

Post by zbabyface » Sat Dec 04, 2010 12:28 am

This didn't work for me....

I do have a 3rd party login / log out... things have gotten kinda complex.... :)

Logout Button appears on menu as option
When person presses logout, it automatically logs out the user and then sends them to:

http://thefamilyunitpg.com/index.php?op ... ask=logout

Then I have metamod(login module) , when the user logs in I'm getting an error:
* Your session has expired. Please log in again.

Registered Area
Welcome!
Welcome to the registered user area of our site.

1.5.22
Jomsocial
Metamod
rokbox

any suggestions would be great!

harrel
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Fri Dec 03, 2010 10:23 pm
Contact:

Re: Your session has expired. Please log in again

Post by harrel » Sat Dec 04, 2010 12:20 pm

Go to global configuration and select session handler to none

zbabyface
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Sep 19, 2008 4:16 pm

Re: Your session has expired. Please log in again

Post by zbabyface » Mon Dec 20, 2010 9:20 pm

harrel wrote:Go to global configuration and select session handler to none
Didn't work either...

lucausa75
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Thu Jun 04, 2009 10:43 am

Re: Your session has expired. Please log in again

Post by lucausa75 » Tue Dec 28, 2010 9:38 am

harrel wrote:Go to global configuration and select session handler to none

Until now it worked for me!

User avatar
alexandrecintra
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Feb 08, 2010 2:44 pm

Re: Your session has expired. Please log in again

Post by alexandrecintra » Thu Feb 24, 2011 2:54 am

After to look for several solutions, I decided to analise the joomla source and I hacked the core. It works for me.

Insert at begin of the method checkToken found at libraries/joomla/environment/request.php

Code: Select all

        if (JRequest::getCmd("option")=="com_user" && JRequest::getCmd("task")=="login") {
            return true;
        }
What does this method do?

It just skip to check the token when the user is authenticating.

I don't know why it doesn't recover the token. I need to study more this code.

I'm not sure it it's a good solution.

Regards

bashkimi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Mar 15, 2011 3:26 pm

Re: Your session has expired. Please log in again

Post by bashkimi » Mon Apr 11, 2011 3:29 pm

Have this problem as well. Sometimes I cannot login from front-end. It shows "You're not authorized to view this resource" and then "Please Login or Register".

Just when I close all browsers and open again, I am able to login.

When it happens, I can see that In degub mode, the session is invalid or whatever. It shows similar to the one on this topic

"SET `time`='1231609498',`userid`='0',`usertype`='',`username`='',`gid`='0',`guest`='1',`client_id`='0',`data`='__default|a:9:{s .... "

sanjud8209
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Aug 29, 2016 10:48 pm

Re: Your session has expired. Please log in again

Post by sanjud8209 » Mon Aug 29, 2016 10:50 pm

Check the .htaccess file and remove the bellow codes
Or just rename your .htaccess to htaccess.txt

RewriteCond %{REQUEST_URI} ^/index\.php/
RewriteRule ^index.php/(.*) /$1 [R,L]

This solve my issue


Locked

Return to “Migrating and Upgrading to Joomla! 1.5”