Exemplo n.º 1
0
 /**
  * Devuelve información del sistema para el informe de errores
  * @return type la información del sistema
  */
 public function system_info()
 {
     $txt = 'facturascripts: ' . $this->version() . "\n";
     $txt .= 'os: ' . php_uname() . "\n";
     $txt .= 'php: ' . phpversion() . "\n";
     $txt .= 'database type: ' . FS_DB_TYPE . "\n";
     $txt .= 'database version: ' . $this->db->version() . "\n";
     if ($this->cache->connected()) {
         $txt .= "memcache: YES\n";
     } else {
         $txt .= "memcache: NO\n";
     }
     $txt .= 'memcache version: ' . $this->cache->version() . "\n";
     if (function_exists('curl_init')) {
         $txt .= "curl: YES\n";
     } else {
         $txt .= "curl: NO\n";
     }
     $txt .= 'plugins: ' . join(',', $GLOBALS['plugins']) . "\n";
     if (isset($_SERVER['REQUEST_URI'])) {
         $txt .= 'url: ' . $_SERVER['REQUEST_URI'] . "\n------";
     }
     foreach ($this->get_errors() as $e) {
         $txt .= "\n" . $e;
     }
     return str_replace('"', "'", $txt);
 }
 public function __construct()
 {
     if (!isset(self::$memcache)) {
         if (class_exists('Memcache')) {
             self::$memcache = new Memcache();
             if (@self::$memcache->connect(FS_CACHE_HOST, FS_CACHE_PORT)) {
                 self::$connected = TRUE;
                 self::$error = FALSE;
                 self::$error_msg = '';
             } else {
                 self::$connected = FALSE;
                 self::$error = TRUE;
                 self::$error_msg = 'Error al conectar al servidor Memcache.';
             }
         } else {
             self::$memcache = NULL;
             self::$connected = FALSE;
             self::$error = TRUE;
             self::$error_msg = 'Clase Memcache no encontrada. Debes
            <a target="_blank" href="http://www.facturascripts.com/community/item.php?id=5215f68318c088e12e1a92f1">
            instalar Memcache</a> y activarlo en el php.ini';
         }
     }
 }
Exemplo n.º 3
0
 public function __construct()
 {
     if (!isset(self::$memcache)) {
         if (class_exists('Memcache')) {
             self::$memcache = new Memcache();
             if (@self::$memcache->connect(FS_CACHE_HOST, FS_CACHE_PORT)) {
                 self::$connected = TRUE;
                 self::$error = FALSE;
                 self::$error_msg = '';
             } else {
                 self::$connected = FALSE;
                 self::$error = TRUE;
                 self::$error_msg = 'Error al conectar al servidor Memcache.';
             }
         } else {
             self::$memcache = NULL;
             self::$connected = FALSE;
             self::$error = TRUE;
             self::$error_msg = 'Clase Memcache no encontrada. Debes
            <a target="_blank" href="//www.facturascripts.com/comm3/index.php?page=community_item&id=553">
            instalar Memcache</a> y activarlo en el php.ini';
         }
     }
     self::$php_file_cache = new php_file_cache();
 }