当前位置: 首页>>代码示例>>PHP>>正文


PHP GO::isInstalled方法代码示例

本文整理汇总了PHP中GO::isInstalled方法的典型用法代码示例。如果您正苦于以下问题:PHP GO::isInstalled方法的具体用法?PHP GO::isInstalled怎么用?PHP GO::isInstalled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GO的用法示例。


在下文中一共展示了GO::isInstalled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_system


//.........这里部分代码省略.........
    $ze1compat = ini_get('zend.ze1_compatibility_mode');
    $test['name'] = 'zend.ze1_compatibility_mode';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = empty($ze1compat);
    $test['feedback'] = 'Fatal error: zend.ze1_compatibility_mode is enabled. ' . $product_name . ' can\'t run with this setting enabled';
    $test['fatal'] = true;
    $tests[] = $test;
    $url = "http" . (!empty($_SERVER['HTTPS']) ? "s" : "") . "://" . $_SERVER['HTTP_HOST'];
    $headers = @get_headers($url . '/caldav');
    $test['name'] = 'CalDAV alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /caldav was not detected. Please create: Alias /caldav /groupoffice/modules/caldav/calendar.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/.well-known/caldav');
    $test['name'] = 'CalDAV autodiscovery';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The redirect /.well-known/caldav was not detected. Please create a redirect: Redirect 301 /.well-known/caldav /caldav";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/carddav');
    $test['name'] = 'CardDAV alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /carddav was not detected. Please create: Alias /carddav /groupoffice/modules/carddav/addressbook.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/.well-known/carddav');
    $test['name'] = 'CardDAV autodiscovery';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '301') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The redirect /.well-known/carddav was not detected. Please create a redirect: Redirect 301 /.well-known/carddav /carddav";
    $test['fatal'] = false;
    $tests[] = $test;
    $headers = @get_headers($url . '/Microsoft-Server-ActiveSync');
    //	var_dump($headers);
    $test['name'] = 'Microsoft-Server-ActiveSync alias';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = $headers && (strpos($headers[0], '401') !== false || strpos($headers[0], '200') !== false);
    $test['feedback'] = "Note: The alias /Microsoft-Server-ActiveSync was not detected. Please create: Alias /Microsoft-Server-ActiveSync /groupoffice/modules/z-push/index.php.";
    $test['fatal'] = false;
    $tests[] = $test;
    $test['name'] = 'Shared Memory Functions';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = function_exists('sem_get') && function_exists('shm_attach') && function_exists('sem_acquire') && function_exists('shm_get_var');
    $test['feedback'] = "InterProcessData::InitSharedMem(): PHP libraries for the use shared memory are not available. Z-push will work unreliably!";
    $test['fatal'] = false;
    $tests[] = $test;
    $test['name'] = 'Process Control Extensions';
    $test['showSuccessFeedback'] = false;
    $test['pass'] = function_exists('posix_getuid');
    $test['feedback'] = "Process Control Extensions PHP library not avaialble. Z-push will work unreliably!";
    $test['fatal'] = false;
    $tests[] = $test;
    if (class_exists('GO')) {
        //		$test['name']='Writable license file';
        //		$test['pass']=GO::getLicenseFile()->exists() && GO::getLicenseFile()->isWritable();
        //		$test['feedback']="Fatal: the license file ".GO::getLicenseFile()->path()." is not writable. Please make it writable for the webserver.";
        //		$test['fatal']=true;
        //
        //		$tests[]=$test;
        $root = dirname(dirname(__FILE__));
        if ($ioncubeWorks && is_dir($root . '/modules/professional')) {
            $test['name'] = 'Professional license';
            $test['showSuccessFeedback'] = false;
            //		if(!file_exists(GO::config()->root_path.'groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt')){
            //			$test['feedback']='Warning: There\'s no license file "groupoffice-pro-'.\GO::config()->getMajorVersion().'-license.txt" in the root of Group-Office. The professional modules will not be enabled.';
            //			$test['fatal']=false;
            //			$test['pass']=false;
            //		}else
            if (!\GO::scriptCanBeDecoded('Professional')) {
                $test['feedback'] = 'Warning: Your professional license is invalid. The professional modules will not be enabled. Please contact Intermesh about this problem and supply the output of this page.';
                $test['fatal'] = false;
                $test['pass'] = false;
            } else {
                $test['feedback'] = '';
                $test['fatal'] = false;
                $test['pass'] = true;
            }
            $tests[] = $test;
        }
        if (\GO::isInstalled()) {
            $test['name'] = 'Protected files path';
            $test['showSuccessFeedback'] = false;
            $test['pass'] = is_writable(\GO::config()->file_storage_path);
            $test['feedback'] = 'Fatal error: the file_storage_path setting in config.php is not writable. You must correct this or ' . $product_name . ' will not run.';
            $test['fatal'] = false;
            $tests[] = $test;
            $test['name'] = 'Cronjob';
            $test['showSuccessFeedback'] = false;
            $test['pass'] = GO::cronIsRunning();
            $test['feedback'] = "Warning: The main cron job doesn't appear to be running. Please add a cron job: \n\n* * * * * www-data php " . \GO::config()->root_path . "groupofficecli.php -c=" . \GO::config()->get_config_file() . " -r=core/cron/run -q > /dev/null";
            $test['fatal'] = false;
            $tests[] = $test;
        }
    }
    return $tests;
}
开发者ID:ajaboa,项目名称:crmpuan,代码行数:101,代码来源:gotest.php

示例2: ini_set

 *
 * This file is part of Group-Office. You should have received a copy of the
 * Group-Office license along with Group-Office. See the file /LICENSE.TXT
 *
 * If you have questions write an e-mail to info@intermesh.nl
 *
 * @copyright Copyright Intermesh
 * @version $Id: index.php 8246 2011-10-05 13:55:38Z mschering $
 * @author Merijn Schering <mschering@intermesh.nl>
 */
ini_set('display_errors', 'On');
$root = dirname(__FILE__) . '/';
//initialize autoloading of library
require_once 'GO.php';
//\GO::init();
if (!GO::isInstalled()) {
    header('Location: ' . \GO::config()->host . 'install/');
    exit;
}
if (empty($_REQUEST['r']) && PHP_SAPI != 'cli') {
    if (\GO::config()->force_ssl && !\GO\Base\Util\Http::isHttps()) {
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: https://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
        exit;
    }
}
if (!\GO::user()) {
    \GO::session()->loginWithCookies();
}
//try with HTTP auth
if (!\GO::user() && !empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
开发者ID:ajaboa,项目名称:crmpuan,代码行数:31,代码来源:index.php

示例3: cache

 /**
  * Returns cache driver. Cached items will persist between connections and are
  * available to all users. When debug is enabled a dummy cache driver is used
  * that caches nothing.
  * 
  * @return \GO\Base\Cache\CacheInterface
  */
 public static function cache()
 {
     if (!isset(self::$_cache)) {
         if (GO::config()->debug || !GO::isInstalled()) {
             self::$_cache = new \GO\Base\Cache\None();
         } else {
             if (!isset(GO::session()->values['cacheDriver'])) {
                 $cachePref = array("\\GO\\Base\\Cache\\Apc", "\\GO\\Base\\Cache\\Disk");
                 foreach ($cachePref as $cacheDriver) {
                     $cache = new $cacheDriver();
                     if ($cache->supported()) {
                         GO::debug("Using {$cacheDriver} cache");
                         GO::session()->values['cacheDriver'] = $cacheDriver;
                         self::$_cache = $cache;
                         break;
                     }
                 }
             } else {
                 $cacheDriver = GO::session()->values['cacheDriver'];
                 self::$_cache = new $cacheDriver();
             }
         }
     }
     return self::$_cache;
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:32,代码来源:GO.php


注:本文中的GO::isInstalled方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。