DELETE FROM jos_session

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
ngiuliani
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 04, 2012 8:22 am

DELETE FROM jos_session

Post by ngiuliani » Wed Apr 04, 2012 8:37 am

Hello.

I have installed my joomla site on my local web server. I have recently noticed that I cannot enter one menu page; moreover local webserver is much slower than before. I have surfed over the internet to find a solution (repairing jos_session with the aid of phpmyadmin, entering mysqlcheck -u root etc...) but no solution seems to work up to now.
Can you help? I have to move my site live but first I need to fix this problem...

On administration site here is what I can read:
DELETE
FROM jos_session
WHERE ( time < '1333526874' )
SELECT *
FROM jos_session
WHERE session_id = 'jjrb6087qdkidmovej3l2go1n4'
UPDATE `jos_session`
SET `time`='1333528074',`userid`='62',`usertype`='Super Administrator',`username`='admin',`gid`='25',`guest`='0',`client_id`='1'
WHERE session_id='jjrb6087qdkidmovej3l2go1n4'
SELECT *
FROM jos_components
WHERE parent = 0
SELECT folder AS type, element AS name, params
FROM jos_plugins
WHERE published >= 1
AND access <= 2
ORDER BY ordering
SELECT id, title, module, position, content, showtitle, control, params
FROM jos_modules AS m
LEFT JOIN jos_modules_menu AS mm
ON mm.moduleid = m.id
WHERE m.published = 1
AND m.access <= 2
AND m.client_id = 1
ORDER BY position, ordering
SELECT COUNT(*)
FROM jos_session
WHERE userid != 0
ORDER BY usertype, username
SELECT username, time, userid, usertype, client_id
FROM jos_session
WHERE userid != 0
ORDER BY usertype, username
SELECT template
FROM jos_templates_menu
WHERE client_id = 1
AND menuid = 0
SELECT a.hits, a.id, a.sectionid, a.title, a.created, u.name
FROM jos_content AS a
LEFT JOIN jos_users AS u
ON u.id=a.created_by
WHERE a.state <> -2
ORDER BY hits DESC
LIMIT 0, 10
SELECT a.id, a.sectionid, a.title, a.created, a.modified, u.name, a.created_by_alias, a.created_by
FROM jos_content AS a
LEFT JOIN jos_users AS u
ON u.id = a.created_by
WHERE a.state <> -2
ORDER BY created DESC
LIMIT 0, 10
SELECT menutype, COUNT(id) AS numitems
FROM jos_menu
WHERE published = 1
GROUP BY menutype
SELECT a.*, SUM(b.home) AS home
FROM jos_menu_types AS a
LEFT JOIN jos_menu AS b
ON b.menutype = a.menutype
GROUP BY a.id
SELECT *
FROM jos_components
WHERE `option` <> "com_frontpage"
AND `option` <> "com_media"
AND enabled = 1
ORDER BY ordering, name
SELECT COUNT(*)
FROM jos_messages
WHERE state = 0
AND user_id_to = 62
SELECT COUNT( session_id )
FROM jos_session
WHERE guest <> 1

Thanks for helping.

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17516
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: DELETE FROM jos_session

Post by toivo » Wed Apr 04, 2012 8:30 pm

What is the purpose of listing those SQL statements? You can delete all rows from the session table and then login, without causing any damage to the site.
Toivo Talikka, Global Moderator

ngiuliani
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 04, 2012 8:22 am

Re: DELETE FROM jos_session

Post by ngiuliani » Mon Apr 09, 2012 5:52 pm

toivo wrote:What is the purpose of listing those SQL statements? You can delete all rows from the session table and then login, without causing any damage to the site.
Thanks for suggestion. If I am not too forward, could you explain to me how to delete all rows from the session table? As you can guess I have a self-taught knowledge of joomla...

Thanks for helping.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31086
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: DELETE FROM jos_session

Post by Per Yngve Berg » Mon Apr 09, 2012 6:32 pm


isyweb
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Nov 09, 2010 10:31 am

Re: DELETE FROM jos_session

Post by isyweb » Sat Mar 22, 2014 11:09 am

Hmmm...

I've just followed the advice above, and it looks like I cannot log in anymore!

Here is what I get...

jtablesession::store failed
DB function failed with error number 1142
INSERT command denied to user 'xxxxxxxxxxx'@'10.0.135.144' for table 'jos_session' SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'abaea48aba1519033f8be98cccb3109e','1395486331','','0','1','1' )

So no damage at all ?

isyweb
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Nov 09, 2010 10:31 am

Re: DELETE FROM jos_session

Post by isyweb » Sat Mar 22, 2014 11:31 am

OK, it's fixed now, basically I had to wait a little after the operation. All back to normal now!


Locked

Return to “Installation 1.5”