Changeset 1064
- Timestamp:
- 05/05/2008 10:27:41 AM (2 years ago)
- Files:
-
- 1 modified
-
branches/1.1.6.5/wikka.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1.6.5/wikka.php
r1052 r1064 51 51 */ 52 52 if (!defined('ERROR_WAKKA_LIBRARY_MISSING')) define('ERROR_WAKKA_LIBRARY_MISSING','The necessary file "libs/Wakka.class.php" could not be found. To run Wikka, please make sure the file exists and is placed in the right directory!'); 53 if (!defined('ERROR_WRONG_PHP_VERSION')) define('ERROR_WRONG_PHP_VERSION', '$_REQUEST[] not found. Wakka requires PHP 4.1.0 or higher!'); 53 define('ERROR_WRONG_PHP_VERSION', 'Wikka requires PHP %s or higher!'); // %s - version number 54 define('MINIMUM_PHP_VERSION', '4.1'); 54 55 if (!defined('ERROR_MYSQL_SUPPORT_MISSING')) define('ERROR_MYSQL_SUPPORT_MISSING', 'PHP can\'t find MySQL support but Wikka requires MySQL. Please check the output of <tt>phpinfo()</tt> in a php document for MySQL support: it needs to be compiled into PHP, the module itself needs to be present in the expected location, <strong>and</strong> php.ini needs to have it enabled.<br />Also note that you cannot have <tt>mysqli</tt> and <tt>mysql</tt> support both enabled at the same time.<br />Please double-check all of these things, restart your webserver after any fixes, and then try again!'); 55 56 if (!defined('ERROR_SETUP_FILE_MISSING')) define('ERROR_SETUP_FILE_MISSING', 'A file of the installer/ upgrader was not found. Please install Wikka again!'); … … 82 83 // Sanity checks - we die if these conditions aren't met 83 84 84 // stupid version check 85 if (!isset($_REQUEST)) 86 { 87 die(ERROR_WRONG_PHP_VERSION); // TODO replace with php version_compare 85 // More intelligent version check, more intelligently placed ;) 86 if (!function_exists('version_compare') || 87 version_compare(phpversion(),MINIMUM_PHP_VERSION,'<') // < PHP minimum version?? 88 ) 89 { 90 $php_version_error = sprintf(ERROR_WRONG_PHP_VERSION,MINIMUM_PHP_VERSION); 91 die($php_version_error); # fatalerror !!! default error in English 88 92 } 89 93 // MySQL needs to be installed and available