我已经在 CentOs 上的 Apache+php+mysql 上安装了最新的 phpMyAdmin。
但经过一段时间不活动后,我得到了
1440秒内无活动;请重新登录。
并重定向到 phpMyAdmin 登录页面。
我已经编辑了 /etc/php.ini 并设置
session.gc_maxlifetime 999999
并重新启动了 HTTPD。
但我仍然遇到相同的错误。我该如何修复它?
由于它是生产环境,我如何使 phpMyAdmin 会话持续 20 多天。
谢谢
===========================================================================================
我的 phpinfo 会话如下
Session Support enabled
Registered save handlers files user
Registered serializer handlers php php_binary wddx
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 999999 999999
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /var/lib/php/session /var/lib/php/session
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0
答案1
同样的问题困扰了我好几个星期,但我认为现在我找到了答案,至少对于最新版本的 phpMyAdmin(我目前使用的是 4.1.14 版)。您需要更改设置->功能->登录 cookie 有效性。获取此设置的方法如下:
1) Login to phpMyAdmin
2) From the home screen click on "More settings" (middle bottom of screen for me)
3) Click the "Features" tab/button towards the top of the screen.
4) For 20 days set the "Login cookie validity" setting to 1728000
5) Apply.
希望有帮助?