We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5528
    • 14 Posts
    Hi Coroico,

    Thanks for the great support!! I have downloaded the file, and replaced my old file, but when I try to search, there is still error message "php_mbstring extension required". Perhaps I have missed something? please advise. http://jaguartech.com.tw

    Thanks again, I love this forum! laugh
      • 5811
      • 1,717 Posts
      I think you get this message because:
      if ($database_connection_charset != 'utf8' && !extension_loaded('mbstring')) {
        $result = "php_mbstring extension required";
      }

      In your previous message you get the following message error :

      Fatal error: Call to undefined function mb_convert_encoding() in ..\modx\assets\snippets\AjaxSearch\AjaxSearch.php on line 67

      because you try to use a mbstring function:
          $searchString = mb_convert_encoding($_POST['search'],$pgEncoding , "UTF-8");

      Could you check that your $database_connection_charset variable in the file /manager/includes/config.inc.php is initialized with "utf8". You should find a line :
      $database_connection_charset = 'utf8';

      Be carefull the true connection charset is ’utf8’ not ’UTF-8’. Mysql base use ’utf8’ and html pages ’UTF-8’ >:(

      If this variable is not well initialized; Do it and reload your page in your browser

      If yes, do an another test : open the AjaxSearch.php file and change the line 66 by :
      $result = "AjaxSearch: php_mbstring extension required";

      I think it’s not necessary but i would like to be sure that your message come from the test of the line 65

      Let me know the results
        • 5528
        • 14 Posts
        Coroico, yes, I checked my config.inc.php and changed from ’UTF-8’ to ’UTF8’, and then reloaded the page, then I found the Chinese characters in the navigation tabs turned into unreadable codes, I then tried to do a search, and still no luck...

        Maybe I should buy a better server, as ’GoDaddy economic hosting’ doesn’t seem to work well for me.

        Thanks for your kind support!! wink
          • 5811
          • 1,717 Posts
          Hi Cmku,

          I look at your web site http://jaguartech.com.tw and i see that when i try to search any term (like ssssssss) I get the message : "AjaxSearch: php_mbstring extension required".

          So you get the modified message that it confirms that the test
          if ($database_connection_charset != 'utf8' && !extension_loaded('mbstring')) {
            $result = "AjaxSearch: php_mbstring extension required";
          }
          is true sad
          if your php mbstring extension is not loaded, I deduce that $database_connection_charset is still different of ’utf8’

          Be careful, the $database_connection_charset shoud be ’utf8’ in lower case, not ’UTF-8’ nor ’UTF8’
            • 10449
            • 956 Posts
            re: http://yhact.com/cms/
            In FF, everything looks OK, apart from hover texts in chinese and part of the html-title. Search also works, incl. highlighting (engl. + chinese)
            In Safari/Win, I see no chinese characters at all, just squares and gibberish. But OK, it’s still officially in beta anyway...
            IE7 behaves pretty much the same as FF.
            (WinXP)
              • 5528
              • 14 Posts
              ganeshXL, yhact.com/cms is working fine, with Coroico’s help smiley, as it is not hosted with the economy GoDaddy account. The problem site is at jaguartech.com.tw, now I have used flexSearch for the moment, until I shift it to a better server. Thanks for checking, cheers!
                • 30100
                • 58 Posts
                I’m trying to get ajaxSearch to display swedish characters åäö, the rest of my site displays åäö just fine but the search results displays in a bit different unreadeble characters depending on the combination of charsets I use.

                My MODx version is 0.9.6.1p2 and ajaxSearch is 1.7.
                MySQL server is set to UTF-8 Unicode (utf8) and collation and charsets in databases set to latin1_swedish_ci
                My MODx are $database_connection_charset = ’latin1’;

                Search results look like this:
                Ã…rstider (should be Årstider)

                Förhoppning (should be Förhoppning)

                Jämtländsk (should be Jämtländsk)

                Where should I change which charset to get the same result as in my documents?