Get the most out of your Centmin Mod LEMP stack
Become a Member

Xenforo mysql error when using ' character in search

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

  1. moshbit

    moshbit Member

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    12:09 PM
    1.5.8
    MariaDB 5.5
    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

    30,630
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,307
    Local Time:
    6:09 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    41
    10
    8
    Jun 15, 2014
    Ratings:
    +10
    Local Time:
    12:09 PM
    1.5.8
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,940
    962
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,315
    Local Time:
    4:09 AM
    1.11
    10.2
    • Like Like x 1