Debian based systems Session killed at 30 minutes in special cron, how to override?

前端 未结 6 1622
离开以前
离开以前 2020-12-09 06:01

Have been pulling out my hair trying to find out why my sessions are being terminated/killed/destroyed at 30 minutes. Well it looks like Debian based systems have a special

6条回答
  •  一生所求
    2020-12-09 06:33

    If you came here because your cron is throwing errors every 30 Minutes (at 09 and 39) you may have simmilar errors in your syslog and/or mailbox:

    [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm
    PHP Fatal error: Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
    

    The reason for this maybe that you upgraded your Debian to Wheezy and you have old entrys in your /etc/php5/apache2/php.ini.

    I had to comment out the following lines and the errors vanished.

    • allow_call_time_pass_reference
    • register_long_arrays

    Im writing this because this is one of the top google results if you search for the error-messages and it may affect many users/admins who maintained thier debian-installations for more than one release.

    PS: This helped me very much: http://vernontbludgeon.com/blog/archives/2013/10/debian-php-session-garbage-collection-maxlifetime-fails-when-php.ini-has-obsolete-directives.html

提交回复
热议问题