Yii 查看系统当前配置是否满足Yii运行条件

使用Yii已经做了好几个web应用了,发现这个东西越来越好用了。它的

  1. 灵活,
  2. 插件的丰富,
  3. 功能的齐全,
  4. 开发的便利,
  5. 诊断的便利,

让我爱不释手。今天谈谈Yii给你提供一个便利,能够测试你当前系统的配置是否满足了yii运行条件。

这里的系统总括

  • 操作系统
  • apche/httpd
  • php

有个便利可以让你很容易检测因为你的系统导致的Yii某些功能不能正常的原因。其方法是通过运行yii/requirements/index.php,如:

http://localhost/yii-1.1.13.e9e4a0/requirements/

你会看到

Description

This script checks if your server configuration meets the requirementsfor running
Yii Web applications.It checks if the server is running the right version of PHP,if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.

Conclusion

Your server configuration satisfies the minimum requirements by Yii. Please pay attention to the warnings listed below if your application will use the corresponding features.

Details

Name Result Required By Memo
PHP version Passed Yii Framework PHP 5.1.0 or higher is required.
$_SERVER variable Passed Yii Framework  
Reflection extension Passed Yii Framework  
PCRE extension Passed Yii Framework  
SPL extension Passed Yii Framework  
DOM extension Passed CHtmlPurifier,
CWsdlGenerator
 
PDO extension Passed All
DB-related classes
 
PDO SQLite extension Passed All
DB-related classes
This is required if you are using SQLite database.
PDO MySQL extension Passed All
DB-related classes
This is required if you are using MySQL database.
PDO PostgreSQL extension Warning All
DB-related classes
This is required if you are using PostgreSQL database.
PDO Oracle extension Warning All
DB-related classes
This is required if you are using Oracle database.
PDO MSSQL extension (pdo_mssql) Warning All
DB-related classes
This is required if you are using MSSQL database from MS Windows
PDO MSSQL extension (pdo_dblib) Warning All
DB-related classes
This is required if you are using MSSQL database from GNU/Linux or other UNIX.
PDO MSSQL extension (pdo_sqlsrv) Warning All
DB-related classes
This is required if you are using MSSQL database with the driver provided by Microsoft.
Memcache extension Passed CMemCache  
APC extension Warning CApcCache  
Mcrypt extension Warning CSecurityManager This is required by encrypt and decrypt methods.
SOAP extension Warning CWebService,
CWebServiceAction
 
GD extension with
FreeType support
or ImageMagick
extension with
PNG support
Passed CCaptchaAction  
Ctype extension Passed CDateFormatter,
CDateTimeParser,
CTextHighlighter,
CHtmlPurifier
 
  passed   failed   warning

如果你的result那一列时warning,你就需要注意一下了。

我的Yii验证码不能工作就时因为GD那一项时warning导致的。

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

留言

你的邮箱是保密的 必填的信息用*表示