public function settingsAction()
 {
     $config = SphinxSearch_Config_Plugin::getInstance();
     $config_data = $config->getData();
     $lastrun = new Zend_Date($config_data["indexer"]["lastrun"]);
     $settings = array("pid" => $config_data["path"]["pid"], "logfile" => $config_data["path"]["log"], "querylog" => $config_data["path"]["querylog"], "indexer" => $config_data["path"]["indexer"], "phpcli" => $config_data["path"]["phpcli"], "path_searchd" => $config_data["path"]["searchd"], "indexer_maintenance" => $config_data["indexer"]["runwithmaintenance"], "indexer_period" => $config_data["indexer"]["period"], "searchd_port" => $config_data["searchd"]["port"] > 0 ? $config_data["searchd"]["port"] : 9312, "documents_i18n" => $config_data["documents"]["use_i18n"] == "true", "indexer_lastrun" => $lastrun->get(Zend_Date::DATETIME), "indexer_onchange" => $config_data["indexer"]["onchange"] ? $config_data["indexer"]["onchange"] : "nothing", "searchd_running" => SphinxSearch_Plugin::isSearchdRunning());
     $this->_helper->json($settings);
 }
 public function stopsearchdAction()
 {
     $output = SphinxSearch_Plugin::stopSearchd();
     $this->_helper->json(array("success" => $output["result"], "message" => $output["message"]));
 }
#!/usr/bin/php
<?php 
/**
 * This source file is subject to the new BSD license that is
 * available through the world-wide-web at this URL:
 * http://www.pimcore.org/license
 *
 * @copyright  Copyright (c) 2013 Weblizards GbR (http://www.weblizards.de)
 * @author     Thomas Keil <*****@*****.**>
 * @license    http://www.pimcore.org/license     New BSD License
 */
ini_set('memory_limit', '2048M');
set_time_limit(-1);
date_default_timezone_set("Europe/Berlin");
include_once dirname(__FILE__) . "/../../../pimcore/config/startup.php";
Pimcore::initAutoloader();
Pimcore::initConfiguration();
Pimcore::initLogger();
Pimcore::initPlugins();
/*$opts = new Zend_Console_Getopt(array(
  'language|l=s' => "language",
  'document|d=s' => "document"
));

try {
  $opts->parse();
} catch (Exception $e) {
  die ("Fehler: ".$e->getMessage());
}*/
$result = SphinxSearch_Plugin::runIndexer();
print $result["output"] . "\nReturn Value: " . $result["return_var"] . "\n";