Discover Centmin Mod today
Register Now

Xenforo mysql error when using ' character in search

Discussion in 'Forum software usage' started by moshbit, Jul 8, 2014.

  1. moshbit

    moshbit Member

    53
    10
    8
    Jun 15, 2014
    Ratings:
    +13
    Local Time:
    5:58 PM
    1.15.0
    MariaDB 10.1.33
    Hey folks, I just noticed in my server logs that I'm getting an error when my users use a ' character in their search queries in XenForo (1.3.1):


    Code:
    Mysqli prepare error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 've been in', '', '', '', '', '0')' at line 4
    
    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in Andy/SearchLog/ControllerPublic/Search.php at line 208
    Andy_SearchLog_ControllerPublic_Search->actionSearch() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/nginx/domains/squattheplanet.com/public/index.php at line 13
    I've been able to reproduce the error consistently. But is this a MariaDB issue, or a Xenforo issue? where should I look for help? thanks!
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,488
    12,130
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,672
    Local Time:
    10:58 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    does it happen on my forums ?

    I am using XF 1.3.3 and Elasticsearch 1.10 addon and Elasticsearch 1.2.1

    tried and checked my server logs and nothing, so could be your specific forum version ?
     
  3. moshbit

    moshbit Member

    53
    10
    8
    Jun 15, 2014
    Ratings:
    +13
    Local Time:
    5:58 PM
    1.15.0
    MariaDB 10.1.33
    nope, doesn't happen on your forums, just mine. but i'm not using any of the elastic search stuff. i'll try updating my version of xenforo to 1.3.3 today and see if it persists.
     
  4. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    8:58 AM
    Mainline
    10.2