Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1369

General Questions/New to Joomla! 5.x • Re: Users logged in to the site

$
0
0
If the Joomla scheduled task Session GC (Session Data Purge) has been scheduled but does not seem to run, the likely reason is the directive session.gc_probability in php.ini, which has been set to 0, to disallow probability based garbage collection, as recommended in the PHP reference manual.

In shared hosting the setting session.gc_probability cannot be changed, but it is still possible to clean guest sessions. Run the Joomla scheduled task Session GC using the cron daemon for example once a day or twice an hour.

The cron job is created in the cPanel provided by your host. The actual command line of the cron job may look like this, where 'example' is the username assigned to your account by your host and 'folder' is the root directory where Joomla resides:

Code:

/usr/local/bin/php /home/example/public_html/folder/cli/joomla.php session:gc
The cron method gets rid of the guest sessions at the intervals you configure in the cron job. The login sessions of the logged-in users are not affected. It supports both session handlers, Database and Filesystem.

Ref. Session Functions - session_gc: Session data garbage collection

Statistics: Posted by toivo — Sat Nov 09, 2024 5:17 am



Viewing all articles
Browse latest Browse all 1369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>