public function CheckSphinxRunning() { $SphinxSearchModel = new SphinxClient(); ///@todo fix this from getting new instance of sphinxclient $Status = $SphinxSearchModel->Status(); //will return an array of misc info if sphinx is running if (!empty($Status)) { parent::Update(SS_SUCCESS, 'SearchdRunning', TRUE); //save as running return $Status; //yes, it is } else { parent::Update(SS_SUCCESS, 'SearchdRunning', FALSE); //save as not running return FALSE; //not running } }
/** * simply checks to see if that file exists there * * @param type $IndexerPath * @param type $SearchdPath */ private function DetectProgram($ShowError, $Files) { foreach ($Files as $Name => $Path) { if (!file_exists($Path)) { if ($ShowError) { parent::Update(SS_FATAL_ERROR, $Name, 'Not Detected', T($Name . ' not found at: ' . $Path) . "<br>May also try\n turning on all errors, error_reporting(E_ALL);, to see if 'open_basedir restriction is NOT in effect"); } //save as 'not detected' $Error = TRUE; } else { parent::Update(SS_SUCCESS, $Name, $Path); } //save path in settings } if (isset($Error)) { return FALSE; } else { return TRUE; } //found }
/** * this is called after the poller has successfully installed */ public function SaveLocations() { //complete by saving settings parent::Update(SS_SUCCESS, 'IndexerPath', $this->Settings['Install']->InstallPath . DS . 'sphinx' . DS . 'bin' . DS . 'indexer'); parent::Update(SS_SUCCESS, 'SearchdPath', $this->Settings['Install']->InstallPath . DS . 'sphinx' . DS . 'bin' . DS . 'searchd'); parent::Update(SS_SUCCESS, 'ConfPath', $this->Settings['Install']->InstallPath . DS . 'sphinx' . DS . 'etc' . DS . 'sphinx.conf'); }