1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Unable to query the database loop on Plesk Clients Search Filter

Discussion in 'Plesk Expand 2.3 Troubleshooting Issues' started by eugenevdm, Dec 26, 2011.

  1. eugenevdm

    eugenevdm Silver Pleskian

    30
    68%
    Joined:
    Nov 11, 2003
    Messages:
    611
    Likes Received:
    0
    I was looking for a client in Expand by typing the client's name in the "Plesk Client" search box.

    Now navigating to Plesk Clients perpetually gives the following error:

    Error Unable to query the database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 1. SQL: SELECT c.id as id, c.status as status, IF (c.status > 0, 2, 1) as status_conv, c.pname as name, c.cname as company, s.name as server, c.server_id as server_id, UNIX_TIMESTAMP(c.cr_date) as cr_date, c.domains_count as domains_count, c.login as login FROM plesk_server AS s LEFT JOIN plesk_server_geninfo AS s_info ON s_info.server_id = s.id LEFT JOIN plesk_client AS c ON c.server_id = s.id WHERE (s.provides_hosting = 'true') AND (c.id is not NULL) ORDER BY status_conv ASC, id ASC, name ASC, company ASC, server ASC, cr_date ASC, domains_count ASC, login ASC limit -1, 1
    Please see more details in the Problem Report ('report-Dec272011-093031.log'):

    ----------- HEADER ---
    Report fullname: /usr/local/expand/var/log/problem_report/report-Dec272011-093031.log
    Report datetime: Dec 27 2011 09:30:31

    Product: PLESK EXPAND
    Version: 2.3.2.17

    User ID: 1
    User Role: sadmin

    ----------- CALL STACK ---
    [call #9] CoreApp->system_die(Unable to query the database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 1. SQL: SELECT c.id as id, c.status as status, IF (c.status > 0, 2, 1) as status_conv, c.pname as name, c.cname as company, s.name as server, c.server_id as server_id, UNIX_TIMESTAMP(c.cr_date) as cr_date, c.domains_count as domains_count, c.login as login FROM plesk_server AS s LEFT JOIN plesk_server_geninfo AS s_info ON s_info.server_id = s.id LEFT JOIN plesk_client AS c ON c.server_id = s.id WHERE (s.provides_hosting = 'true') AND (c.id is not NULL) ORDER BY status_conv ASC, id ASC, name ASC, company ASC, server ASC, cr_date ASC, domains_count ASC, login ASC limit -1, 1);
    called at [/usr/local/expand/frontend/plib/CoreApp.php:915]

    [call #8] CoreApp->app_die(Unable to query the database: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 1. SQL: SELECT c.id as id, c.status as status, IF (c.status > 0, 2, 1) as status_conv, c.pname as name, c.cname as company, s.name as server, c.server_id as server_id, UNIX_TIMESTAMP(c.cr_date) as cr_date, c.domains_count as domains_count, c.login as login FROM plesk_server AS s LEFT JOIN plesk_server_geninfo AS s_info ON s_info.server_id = s.id LEFT JOIN plesk_client AS c ON c.server_id = s.id WHERE (s.provides_hosting = 'true') AND (c.id is not NULL) ORDER BY status_conv ASC, id ASC, name ASC, company ASC, server ASC, cr_date ASC, domains_count ASC, login ASC limit -1, 1);
    called at [/usr/local/expand/frontend/plib/CoreApp.php:760]

    [call #7] CoreApp->db_query(SELECT c.id as id, c.status as status, IF (c.status > 0, 2, 1) as status_conv, c.pname as name, c.cname as company, s.name as server, c.server_id as server_id, UNIX_TIMESTAMP(c.cr_date) as cr_date, c.domains_count as domains_count, c.login as login FROM plesk_server AS s LEFT JOIN plesk_server_geninfo AS s_info ON s_info.server_id = s.id LEFT JOIN plesk_client AS c ON c.server_id = s.id WHERE (s.provides_hosting = 'true') AND (c.id is not NULL) ORDER BY status_conv ASC, id ASC, name ASC, company ASC, server ASC, cr_date ASC, domains_count ASC, login ASC limit -1, 1, , , );
    called at [/usr/local/expand/frontend/plib/CoreLib.php:235]

    [call #6] db_query(SELECT c.id as id, c.status as status, IF (c.status > 0, 2, 1) as status_conv, c.pname as name, c.cname as company, s.name as server, c.server_id as server_id, UNIX_TIMESTAMP(c.cr_date) as cr_date, c.domains_count as domains_count, c.login as login FROM plesk_server AS s LEFT JOIN plesk_server_geninfo AS s_info ON s_info.server_id = s.id LEFT JOIN plesk_client AS c ON c.server_id = s.id WHERE (s.provides_hosting = 'true') AND (c.id is not NULL) ORDER BY status_conv ASC, id ASC, name ASC, company ASC, server ASC, cr_date ASC, domains_count ASC, login ASC limit -1, 1, , , );
    called at [/usr/local/expand/frontend/plib/MysqlDataSource.php:26]

    [call #5] MysqlDataSource->doQuery();
    called at [/usr/local/expand/frontend/plib/uiclasses/ui/DBGrid.php:292]

    [call #4] UI_DBGrid->fill();
    called at [/usr/local/expand/frontend/plib/uiclasses/panel/plesk/client/List.php:116]

    [call #3] Panel_Plesk_Client_List->fill();
    called at [/usr/local/expand/frontend/plib/uiclasses/screen/plesk/client/List.php:340]

    [call #2] Screen_Plesk_Client_List->_draw();
    called at [/usr/local/expand/frontend/plib/uiclasses/screen/plesk/client/List.php:92]

    [call #1] Screen_Plesk_Client_List->Screen_Plesk_Client_List(/exp/plesk/clients.php?from=clients&, 04.00.01, Plesk Clients, clients, );
    called at [/usr/local/expand/frontend/htdocs/plesk/clients.php:74]

    ----------- SERVER ARGUMENTS ---
    [PHP_FCGI_CHILDREN] => 1
    [FCGI_ROLE] => RESPONDER
    [SERVER_SOFTWARE] => sw-cp-server/1.0.0
    [SERVER_NAME] => expand.snowballeffect.net:8442
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PORT] => 8442
    [SERVER_ADDR] => 196.201.6.62
    [REMOTE_PORT] => 50332
    [REMOTE_ADDR] => 196.201.6.2
    [SCRIPT_NAME] => /plesk/clients.php
    [PATH_INFO] =>
    [SCRIPT_FILENAME] => /usr/local/expand/frontend/htdocs/plesk/clients.php
    [DOCUMENT_ROOT] => /usr/local/expand/frontend/htdocs/
    [REQUEST_URI] => /plesk/clients.php?start_path=1
    [QUERY_STRING] => start_path=1
    [REQUEST_METHOD] => GET
    [REDIRECT_STATUS] => 200
    [SERVER_PROTOCOL] => HTTP/1.1
    [HTTPS] => on
    [HTTP_HOST] => expand.snowballeffect.net:8442
    [HTTP_CONNECTION] => keep-alive
    [HTTP_USER_AGENT] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_REFERER] => https://expand.snowballeffect.net:8442/exp/menu.php?release=23217
    [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
    [HTTP_ACCEPT_LANGUAGE] => en-ZA,en-GB;q=0.8,en-US;q=0.6,en;q=0.4
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
    [HTTP_COOKIE] => testing=1; sid=dab5e50dda210070cfb1d6d4c8348091; EXPANDSID=d0863615029f23bd729533e074396c58; BarExpanded=True
    [ORIG_PATH_INFO] =>
    [PHP_SELF] => /plesk/clients.php
    [REQUEST_TIME] => 1324971031
    [argv] => array(
    [0] => start_path=1
    )
    [argc] => 1


    ----------- REQUEST PARAMETERS [GET] ---
    [start_path] => 1


    ----------- REQUEST PARAMETERS [POST] ---
    None

    ----------- DEBUG LOG ---

    ----------- END ---

    Investigation shows that you cannot have a limit statement of "-1". It should be 1 or something else, but -1,1 won't work. Since these queries are internal to Expand I am a little stumped.

    For now I cannot use the Expand system any more. What do you suggest?
     
    Last edited: Dec 26, 2011
Loading...