You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2KB

  1. <?php
  2. /* @var $this YiiRequirementChecker */
  3. /* @var $summary array */
  4. /* @var $requirements array[] */
  5. echo "\nYii Application Requirement Checker\n\n";
  6. echo "This script checks if your server configuration meets the requirements\n";
  7. echo "for running Yii application.\n";
  8. echo "It checks if the server is running the right version of PHP,\n";
  9. echo "if appropriate PHP extensions have been loaded, and if php.ini file settings are correct.\n";
  10. $header = 'Check conclusion:';
  11. echo "\n{$header}\n";
  12. echo str_pad('', strlen($header), '-')."\n\n";
  13. foreach ($requirements as $key => $requirement) {
  14. if ($requirement['condition']) {
  15. echo $requirement['name'].": OK\n";
  16. echo "\n";
  17. } else {
  18. echo $requirement['name'].': '.($requirement['mandatory'] ? 'FAILED!!!' : 'WARNING!!!')."\n";
  19. echo 'Required by: '.strip_tags($requirement['by'])."\n";
  20. $memo = strip_tags($requirement['memo']);
  21. if (!empty($memo)) {
  22. echo 'Memo: '.strip_tags($requirement['memo'])."\n";
  23. }
  24. echo "\n";
  25. }
  26. }
  27. $summaryString = 'Errors: '.$summary['errors'].' Warnings: '.$summary['warnings'].' Total checks: '.$summary['total'];
  28. echo str_pad('', strlen($summaryString), '-')."\n";
  29. echo $summaryString;
  30. echo "\n\n";