Skip to main content
7 votes
Accepted

Do Joomla sessions for guests expire at different periods of time than logged in users?

No, it is not expected behavior that sessions for guests expire faster than sessions for admins. Front-end and back-end users all use the same Session Lifetime which you configure in Administrator > ...
pe7er's user avatar
  • 2,088
7 votes
Accepted

Old sessions not being automatically deleted from the database

I've got a solution after reading the various pull requests on GitHub as pointed out above by Adam Gatt and Drew G. In the summary of changes for github.com/joomla/joomla-cms/pull/19548, is says that ...
Dom's user avatar
  • 511
7 votes

Old sessions not being automatically deleted from the database

I believe changes were made to Joomla with the release of version 3.8.4, and that the session table will no longer be cleared if using 'Database' as the session handler. See this page on Github. The ...
Adam Gatt's user avatar
3 votes

How to disable storing session for guest or public to Joomla table

Another way to reduce the server load is to make the session table of memory type. You need to set mysqls heap size quite large and convert the blob field in session into a large varchar, say 15000 ...
jdog's user avatar
  • 953
3 votes
Accepted

Get Session Value in Joomla

var id='<?php $s = JFactory::getSession(); echo $s->getId();?>'; console.log(id); Simple. That's enough internet for today. For more information on accessing session information please see ...
Grant G's user avatar
  • 714
3 votes

"Warning: session_start(): Failed to read session data" after upgrading from PHP 7.4 to PHP 8.0

Check and manually update any Addhandler directives in the .htaccess file if necessary. For example, you may need to update: This: AddHandler application/x-httpd-php74 .php To this: AddHandler ...
Neil Robertson's user avatar
3 votes
Accepted

How to write the logged in user id in Plotalot queries?

Plotalot includes various variables that can be used in sql queries, eg. %%J_USER_ID%% is the currently logged in user_id. The Plotalot User Documentation Available as PDF here
jamesgarrett's user avatar
  • 3,339
3 votes
Accepted

Failed to Read Session Data After Renaming DB

Found the answer. When I renamed the database I also had to re-assign the database user to this database.
jonboy's user avatar
  • 3,623
2 votes
Accepted

AJAX POST request with form Token always responds with "Invalid Token"

By default JSession::checkToken() checks the post request for a value named the token. It can also be set to look for get values in a query string like JSession::checkToken('get'). It doesn't know ...
jamesgarrett's user avatar
  • 3,339
2 votes
Accepted

How can I change the duration of a front-end session in a component?

On HTML pages you can use Keepalive script which periodically makes AJAX requests to prevent session expiration. It's widely used across the CMS on form pages. Usage in view layout: $this->document-...
Sharky's user avatar
  • 12k
2 votes

Unset filter from user state

The solution I found was $app->setUserState($this->context . '.filter.search', ""); The context can be changed so you can also change filters from different models
Jbadminton's user avatar
2 votes
Accepted

Joomla forgets session (cookie) straight after login

I fixed the problem myself. Unfortunately, it was even my own mistake, you couldn't have come up with the solution. I don't access the Joomla site directly but there is an HTTP gateway before it. The ...
Sumafu's user avatar
  • 31
1 vote
Accepted

Session variable from a module is only accessible from the template after refresh

For this exact issue the solution was to avoid the things that are not working. So instead of trying to get the variable from the module to the template in my php I created a html variable "--...
Jonathan Schmidt's user avatar
1 vote

Application shows session_start(): Failed to read session data: on browser

This error usually means that Joomla has failed to connect to the database. Check that the database credentials are correct. Also check that the relevant options e.g. mysqli are enabled in PHP. If you ...
Neil Robertson's user avatar
1 vote

Does an AJAX request to a PHP script inherit session context

Short answer is yes. From the browser side, any request, ajax or otherwise, will, by default, include the cookies for that domain. The window, the javascript, the onclick event, the staticness of the ...
jamesgarrett's user avatar
  • 3,339
1 vote

Joomla 3.9.23 Installation error after moving configuration file

Green, That's a very unorthodox method of configuring your site. Once you have a system generated configuration.php file from the install, you would be best simply moving that around and adjusting it ...
Patrick Jackson's user avatar
1 vote

Session Management Across Multiple Devices

Disable "Force Logout for all Sessions?" option in "User - Joomla!" plugin.
Sharky's user avatar
  • 12k
1 vote
Accepted

Joomla session get function return old values and don't update with new value

I found a solution by changing the Session Handler in the Session Settings at Administrator->Global Configuration from Database to PHP. Now my code works correctly. But I still don't know why the ...
wahid anvary's user avatar
1 vote

Change Value In Session Array

Session data is stored as Registry. Use keys separated by a dot to access nested properties. $session->set('array.key', 'value');
Sharky's user avatar
  • 12k
1 vote
Accepted

How to manage sessions between Joomla and external PHP applications?

Just keep the session alive by pinging Joomla via JS: <script> setInterval(function(){ var xhttp = new XMLHttpRequest(); xhttp.open('get', 'https://yourdomain.tld/index.php', true); ...
Dennis Heiden's user avatar
1 vote

Joomla session not passed to custom component

As the comment on your question stated, check if you're going from www to non-www. However, I would say that this is not the problem, since you are having the problem more than twice (Category A, B, ...
itoctopus's user avatar
  • 3,236
1 vote

Is there anything wrong with setting Joomla session variables consecutively in an external php script?

OK, the problem is that we got to use the same session. In order to do that. We had to call $session->getId() to get current seeeion_id then send it to the client side, when we create the session ...
Jack Ting's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible