diff options
author | xue <> | 2006-05-14 01:28:44 +0000 |
---|---|---|
committer | xue <> | 2006-05-14 01:28:44 +0000 |
commit | 8848464bd3534a9f831a02c022c94c1d42a4f6e2 (patch) | |
tree | 2da7ada8ae3b2487830665d042f36b5d816e9ef4 /requirements | |
parent | ae43fa72cdae13bace16a5b8250170e472bb2b87 (diff) |
Merge from 3.0 branch till 1063.
Diffstat (limited to 'requirements')
-rw-r--r-- | requirements/index.php | 76 | ||||
-rw-r--r-- | requirements/messages-zh.txt | 8 | ||||
-rw-r--r-- | requirements/messages.txt | 10 |
3 files changed, 83 insertions, 11 deletions
diff --git a/requirements/index.php b/requirements/index.php index 8bb40418..a94c92cf 100644 --- a/requirements/index.php +++ b/requirements/index.php @@ -30,15 +30,70 @@ * @var array List of requirements (required or not, check item, hint)
*/
$requirements = array(
- array(true,'version_compare(PHP_VERSION,"5.0.4",">=")','PHP version check','PHP 5.0.4 or higher required'),
- array(false,'version_compare(PHP_VERSION,"5.1.0",">=")','PHP version check','PHP 5.1.0 or higher preferred'),
- array(true,'class_exists("DOMDocument",false)','DOM extension check','DOM extension required'),
- array(false,'function_exists("iconv")','ICONV extension check','ICONV extension optional'),
- array(false,'extension_loaded("zlib")','Zlib extension check','Zlib extension optional'),
- array(false,'extension_loaded("sqlite")','SQLite extension check','SQLite extension optional'),
- array(false,'extension_loaded("memcache")','Memcache extension check','Memcache extension optional'),
- array(false,'extension_loaded("apc")','APC extension check','APC extension optional'),
- array(false,'extension_loaded("mcrypt")','Mcrypt extension check','Mcrypt extension optional'),
+ array(
+ true,
+ version_compare(PHP_VERSION,"5.0.4",">="),
+ 'PHP version check',
+ 'PHP 5.0.4 or higher required'),
+ array(
+ false,
+ version_compare(PHP_VERSION,"5.1.0",">="),
+ 'PHP version check','PHP 5.1.0 or higher preferred'),
+ array(
+ true,
+ isset($_SERVER["HTTP_ACCEPT"]),
+ '$_SERVER["HTTP_ACCEPT"] check',
+ 'HTTP_ACCEPT required'),
+ array(
+ true,
+ isset($_SERVER["SCRIPT_FILENAME"]) && realpath($_SERVER["SCRIPT_FILENAME"])===realpath(__FILE__),
+ '$_SERVER["SCRIPT_FILENAME"] check',
+ 'SCRIPT_FILENAME required'),
+ array(
+ true,
+ isset($_SERVER["REQUEST_URI"]) || isset($_SERVER["QUERY_STRING"]),
+ '$_SERVER["REQUEST_URI"] check',
+ 'REQUEST_URI required'),
+ array(
+ true,
+ isset($_SERVER["PATH_INFO"]) || strpos($_SERVER["PHP_SELF"],$_SERVER["SCRIPT_NAME"])===0,
+ '$_SERVER["PATH_INFO"] check',
+ 'PATH_INFO required'),
+ array(
+ true,
+ class_exists("DOMDocument",false),
+ 'DOM extension check',
+ 'DOM extension required'),
+ array(
+ false,
+ function_exists("iconv"),
+ 'ICONV extension check',
+ 'ICONV extension optional'),
+ array(
+ false,
+ extension_loaded("zlib"),
+ 'Zlib extension check',
+ 'Zlib extension optional'),
+ array(
+ false,
+ extension_loaded("sqlite"),
+ 'SQLite extension check',
+ 'SQLite extension optional'),
+ array(
+ false,
+ extension_loaded("memcache"),
+ 'Memcache extension check',
+ 'Memcache extension optional'),
+ array(
+ false,
+ extension_loaded("apc"),
+ 'APC extension check',
+ 'APC extension optional'),
+ array(
+ false,
+ extension_loaded("mcrypt"),
+ 'Mcrypt extension check',
+ 'Mcrypt extension optional'),
array(false,'extension_loaded("xsl")','XSL extension check','XSL extension optional'),
);
@@ -47,7 +102,8 @@ $conclusion = 0; foreach($requirements as $requirement)
{
list($required,$expression,$aspect,$hint)=$requirement;
- eval('$ret='.$expression.';');
+ //eval('$ret='.$expression.';');
+ $ret=$expression;
if($required)
{
if($ret)
diff --git a/requirements/messages-zh.txt b/requirements/messages-zh.txt index bb832a4c..b86d96cf 100644 --- a/requirements/messages-zh.txt +++ b/requirements/messages-zh.txt @@ -20,3 +20,11 @@ Mcrypt extension check = Mcrypt模块检查 Mcrypt extension optional = Mcrypt模块是可选的。如果它不存在,某些敏感数据,例如viewstate,将无法被加密。
XSL extension check = XSL模块检查
XSL extension optional = XSL模块是可选的。如果它不存在,您将无法使用TXmlTransform。
+$_SERVER["HTTP_ACCEPT"] check = $_SERVER["HTTP_ACCEPT"]检查
+HTTP_ACCEPT required = $_SERVER["HTTP_ACCEPT"]是必须的。如果它不存在,一些多语言功能可能出错。
+$_SERVER["SCRIPT_FILENAME"] check = $_SERVER["SCRIPT_FILENAME"]检查
+SCRIPT_FILENAME required = $_SERVER["SCRIPT_FILENAME"]必须指向本程序文件路径。
+$_SERVER["REQUEST_URI"] check = $_SERVER["REQUEST_URI"]检查
+REQUEST_URI required = $_SERVER["REQUEST_URI"]或$_SERVER["QUERY_STRING"]是必须的。如果它们都不存在,用户请求将无法被正确解析。
+$_SERVER["PATH_INFO"] check = $_SERVER["PATH_INFO"]检查
+PATH_INFO required = $_SERVER["PATH_INFO"]或$_SERVER["PHP_SELF"]和$_SERVER["SCRIPT_NAME"]是必须的。如果它们都不存在,URL的pathinfo将无法被正确解析。
diff --git a/requirements/messages.txt b/requirements/messages.txt index 405231df..ccda04b2 100644 --- a/requirements/messages.txt +++ b/requirements/messages.txt @@ -19,4 +19,12 @@ ICONV extension optional = ICONV extension is optional. If it is absent, some Mcrypt extension check = Mcrypt extension check
Mcrypt extension optional = Mcrypt extension is optional. If it is absent, sensitive data, such as viewstate, cannot be encrypted.
XSL extension check = XSL extension check
-XSL extension optional = XSL extension is optional. If it is absent, you will not be able to use TXmlTransform.
\ No newline at end of file +XSL extension optional = XSL extension is optional. If it is absent, you will not be able to use TXmlTransform.
+$_SERVER["HTTP_ACCEPT"] check = $_SERVER["HTTP_ACCEPT"] check
+HTTP_ACCEPT required = $_SERVER["HTTP_ACCEPT"] is required by multilanguage support.
+$_SERVER["SCRIPT_FILENAME"] check = $_SERVER["SCRIPT_FILENAME"] check
+SCRIPT_FILENAME required = $_SERVER["SCRIPT_FILENAME"] must point to the file path of this checker script.
+$_SERVER["REQUEST_URI"] check = $_SERVER["REQUEST_URI"] check
+REQUEST_URI required = Either $_SERVER["REQUEST_URI"] or $_SERVER["QUERY_STRING"] must be available for resolving user requests.
+$_SERVER["PATH_INFO"] check = $_SERVER["PATH_INFO"] check
+PATH_INFO required = $_SERVER["PATH_INFO"] or $_SERVER["PHP_SELF"] and $_SERVER["SCRIPT_NAME"] are required for determining URL pathinfo.
|