Article ID: 118701, created on Dec 20, 2013, last review on May 1, 2014

  • Applies to:
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

问题

  1. 登录时出现空白屏幕。

  2. /usr/local/psa/admin/logs/panel.log 中写入了以下错误信息:

    2013-07-28T08:48:19-04:00 ERR (3)  [panel]:Session expired:
    0:Session.php:410
            Session->init()
    1: cmd_loginup.php:135
            createSessionCommon(integer '1', string 'admin', boolean  true, string '1.2.3.4', NULL null, NULL null)
    2: cmd_loginup.php:278
            createSessionAdmin(string 'admin', string '******', boolean  false, NULL null, boolean  true)
    3: cmd_loginup.php:68
            createSession(string 'admin', string '******', boolean  false, boolean  false)
    4: login_up.php3:45
    [28-Jul-2013 08:48:19 America/New_York] Session_Exception:Session expired
    file:/opt/psa/admin/plib/Session.php
    line:410
    code:0
    trace:#0 /opt/psa/admin/plib/cmd_loginup.php(135):Session->init()
    #1 /opt/psa/admin/plib/cmd_loginup.php(278): createSessionCommon(1, 'admin', true, '1.2.3.4', NULL, NULL)
    #2 /opt/psa/admin/plib/cmd_loginup.php(68): createSessionAdmin('admin', 'V***********G', false, NULL, true)
    #3 /opt/psa/admin/htdocs/login_up.php3(45): createSession('admin', 'V***********G', false, false)
    #4 {main}
    
  3. MySQL NOW() 函数返回的时间与 date 命令返回的不同:

    ~# date 
    Fri Nov 8 19:56:46 CST 2013 
    ~# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa -e "SELECT NOW();" 
    +---------------------+ 
    | NOW()               | 
    +---------------------+ 
    | 2013-11-08 20:56:41 | 
    +---------------------+ 
    

原因

MySQL 服务器和操作系统时区设置不同。

解决方案

  1. 请更新 /etc/my.cnf 中的 default-time-zone 参数(Debian/Ubuntu 上的 /etc/mysql/my.cnf)以匹配系统时区:

    ~# grep default-time-zone /etc/my.cnf
    default-time-zone = '-6:00' 
    

    强制 MySQL 使用系统时区,注释配置中的 default-time-zone 参数。

  2. 重启 MySQL 服务器:

    ~# /etc/init.d/mysqld restart 
    Stopping mysqld:[ OK ] 
    Starting mysqld:[ OK ] 
    

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c 01bc4c8cf5b7f01f815a7ada004154a2 29d1e90fd304f01e6420fbe60f66f838 0a53c5a9ca65a74d37ef5c5eaeb55d7f aea4cd7bfd353ad7a1341a257ad4724a

Email subscription for changes to this article