]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/search_sphinx/init.php
pngcrush.sh
[tt-rss.git] / plugins / search_sphinx / init.php
index a6511034d6a94432fd94510e3303ef5afcf83b4d..8520bb0d80bae14a6ae7050537c3a360f91d5ee7 100644 (file)
@@ -11,6 +11,11 @@ class Search_Sphinx extends Plugin {
        function init($host) {
                $host->add_hook($host::HOOK_SEARCH, $this);
 
+               // idk if that would work but checking for the class being loaded is somehow not enough
+               if (class_exists("SphinxClient") && !defined('SEARCHD_COMMAND_SEARCH')) {
+                       user_error("Your PHP has a separate systemwide Sphinx client installed which conflicts with the client library used by tt-rss. Either remove the system library or disable Sphinx support.");
+               }
+
                require_once __DIR__ . "/sphinxapi.php";
        }
 
@@ -56,5 +61,4 @@ class Search_Sphinx extends Plugin {
        function api_version() {
                return 2;
        }
-}
-?>
+}
\ No newline at end of file