diff --git a/yii/requirements/YiiRequirementChecker.php b/yii/requirements/YiiRequirementChecker.php index 9b931d6..f9fab20 100644 --- a/yii/requirements/YiiRequirementChecker.php +++ b/yii/requirements/YiiRequirementChecker.php @@ -176,4 +176,24 @@ class YiiRequirementChecker { return eval('return '.$expression.';'); } + + /** + * Returns the server information. + * @return string server information. + */ + function getServerInfo() + { + $info = isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : ''; + return $info; + } + + /** + * Returns the now date if possible in string representation. + * @return string now date. + */ + function getNowDate() + { + $nowDate = @strftime('%Y-%m-%d %H:%M', time()); + return $nowDate; + } } diff --git a/yii/requirements/views/web/css.php b/yii/requirements/views/web/css.php new file mode 100644 index 0000000..bff20d1 --- /dev/null +++ b/yii/requirements/views/web/css.php @@ -0,0 +1,93 @@ +body +{ + background: white; + font-family:'Lucida Grande',Verdana,Geneva,Lucida,Helvetica,Arial,sans-serif; + font-size:10pt; + font-weight:normal; +} + +#page +{ + width: 800px; + margin: 0 auto; +} + +#header +{ +} + +#content +{ +} + +#footer +{ + color: gray; + font-size:8pt; + border-top:1px solid #aaa; + margin-top:10px; +} + +h1 +{ + color:black; + font-size:1.6em; + font-weight:bold; + margin:0.5em 0pt; +} + +h2 +{ + color:black; + font-size:1.25em; + font-weight:bold; + margin:0.3em 0pt; +} + +h3 +{ + color:black; + font-size:1.1em; + font-weight:bold; + margin:0.2em 0pt; +} + +table.result +{ + background:#E6ECFF none repeat scroll 0% 0%; + border-collapse:collapse; + width:100%; +} + +table.result th +{ + background:#CCD9FF none repeat scroll 0% 0%; + text-align:left; +} + +table.result th, table.result td +{ + border:1px solid #BFCFFF; + padding:0.2em; +} + +td.passed +{ + background-color: #60BF60; + border: 1px solid silver; + padding: 2px; +} + +td.warning +{ + background-color: #FFFFBF; + border: 1px solid silver; + padding: 2px; +} + +td.failed +{ + background-color: #FF8080; + border: 1px solid silver; + padding: 2px; +} diff --git a/yii/requirements/views/web/index.php b/yii/requirements/views/web/index.php new file mode 100644 index 0000000..f5196c8 --- /dev/null +++ b/yii/requirements/views/web/index.php @@ -0,0 +1,82 @@ + + + + + + + +Yii Application Requirement Checker + + + +
+ + + +
+

Description

+

+This script checks if your server configuration meets the requirements +for running Yii application. +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

+

+0): ?> +Unfortunately your server configuration does not satisfy the requirements by this application. +0): ?> +Your server configuration satisfies the minimum requirements by this application. Please pay attention to the warnings listed below if your application will use the corresponding features. + +Congratulations! Your server configuration satisfies all requirements. + +

+ +

Details

+ + + + + + + + + + + +
NameResultRequired ByMemo
+ + + + + + + +
+ + + + + + + +
 passed failed warning
+ +
+ + + +
+ + \ No newline at end of file