• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Session Problem with session.gc_maxlifetime = 7200

MaurizioN

New Pleskian
Hello my english is not so good, but i have a big problem.
In the PHP-settings of Plesk 12 for my domain i have this:

session.gc_maxlifetime = 7200

with phpinfo() its show me the same settings.

Now the problem:
in the folder /var/lib/php5 the sesscion are killed after i think 30-40 minutes.

I dont know which script is responsible for this trouble.

Pleas help me...
 
I resolved the problem by my self:

Hiere the way:

One thing you might not have noticed is that in the Debian/Ubuntu distro, by default PHP disables its session garbage collection mechanism

(eg. the default php.ini contains the line ;session.gc_probability = 0in Ubuntu).

Instead, it runs a cron job every half hour (see the script /etc/cron.d/php5) to purge session files in the /var/lib/php5/ directory. In most cases, this doesn't do the session cleanup job for us as session data may not be saved in files under the /var/lib/php5/ directory (like in Drupal). Thus by default PHP session garbage collection does not run in Debian/Ubuntu as many may expect. To solve this, you can modify the php.ini file by adding the line

session.gc_probability = 1

there. In Drupal, you can also change the settings.php file and add lines such as:

ini_set('session.gc_probability', 1); ini_set('session.gc_divisor', 100);

In addition, then the cron job needs to be disabled . Simply /etc/cron.d/php5 edit with the editor of your choice and comment out the last line :

- See more at: https://www.appnovation.com/blog/session-garbage-collection-php#sthash.e4zh2Lvd.dpuf
 
Back
Top