[ Index ] |
|
Code source de Dotclear 2.0-beta6 |
1 <?php 2 # ***** BEGIN LICENSE BLOCK ***** 3 # This file is part of DotClear. 4 # Copyright (c) 2005 Olivier Meunier and contributors. All rights 5 # reserved. 6 # 7 # DotClear is free software; you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation; either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # DotClear is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with DotClear; if not, write to the Free Software 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 # 21 # ***** END LICENSE BLOCK ***** 22 23 function dcSystemCheck(&$con,&$err) 24 { 25 $err = array(); 26 27 if (version_compare(phpversion(),'5.0','<')) { 28 $err[] = sprintf(__('PHP version is %s (5.0 or earlier needed).'),phpversion()); 29 } 30 31 if (!function_exists('mb_detect_encoding')) { 32 $err[] = __('Multibyte string module (mbstring) is not available.'); 33 } 34 35 if (!function_exists('iconv')) { 36 $err[] = __('Iconv module is not available.'); 37 } 38 39 if (!function_exists('ob_start')) { 40 $err[] = __('Output control functions are not available.'); 41 } 42 43 if (!function_exists('simplexml_load_string')) { 44 $err[] = __('SimpleXML module is not available.'); 45 } 46 47 if (!function_exists('dom_import_simplexml')) { 48 $err[] = __('DOM XML module is not available.'); 49 } 50 51 if (!@preg_match("/\xf8\xa1\xa1\xa1\xa1/u", "\xf8\xa1\xa1\xa1\xa1")) { 52 $err[] = __('PCRE engine does not support UTF-8 strings.'); 53 } 54 55 if (!function_exists("spl_classes")) { 56 $err[] = __('SPL module is not available.'); 57 } 58 59 if ($con->driver() == 'mysql') 60 { 61 if (version_compare($con->version(),'4.1','<')) 62 { 63 $err[] = sprintf(__('MySQL version is %s (4.1 or earlier needed).'),$con->version()); 64 } 65 else 66 { 67 $rs = $con->select('SHOW ENGINES'); 68 $innodb = false; 69 while ($rs->fetch()) { 70 if (strtolower($rs->f(0)) == 'innodb' && strtolower($rs->f(1)) != 'disabled' && strtolower($rs->f(1)) != 'no') { 71 $innodb = true; 72 break; 73 } 74 } 75 76 if (!$innodb) { 77 $err[] = __('MySQL InnoDB engine is not available.'); 78 } 79 } 80 } 81 elseif ($con->driver() == 'pgsql') 82 { 83 if (version_compare($con->version(),'8.0','<')) 84 { 85 $err[] = sprintf(__('PostgreSQL version is %s (8.0 or earlier needed).'),$con->version()); 86 } 87 } 88 89 return count($err) == 0; 90 } 91 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Feb 23 22:16:06 2007 | par Balluche grâce à PHPXref 0.7 |