Error when connecting to Panel ERROR: PleskMainDBException db_query(string 'SELECT login, type, ip_address, ip_dual_stack FROM sessions WHERE sess_id=""')

Refers to:

  • Plesk 11.0 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 13:06:59 UTC

Modified:

2016-12-21 19:59:20 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Error when connecting to Panel ERROR: PleskMainDBException db_query(string 'SELECT login, type, ip_address, ip_dual_stack FROM sessions WHERE sess_id=""')

Symptoms

The following error is appeared when connecting to the panel:

    ERROR: PleskMainDBException
MySQL query failed: Unknown column '' in 'where clause'

0: common_func.php3:220
db_query(string 'SELECT login, type, ip_address, ip_dual_stack FROM sessions WHERE sess_id=""')
1: class.Session.php:420
Session->init(string '1.2.3.4')
2: auth.php3:197

Cause

MySQL configuration file /etc/my.cnf contains following setting:

    set-variable=sql_mode=ANSI_QUOTES

With ANSI_QUOTES enabled, you cannot use double quotation marks to quote literal strings, because it is interpreted as an identifier.

Resolution

Comment this line or delete it in /etc/my.cnf and restart mysql server:

    #/etc/init.d/mysql stop
#/etc/init.d/mysql start
Have more questions? Submit a request
Please sign in to leave a comment.