Changeset 2566:9bf417837888 for admin/install
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- Location:
- admin/install
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/install/check.php
r1743 r2566 15 15 { 16 16 $err = array(); 17 17 18 18 if (version_compare(phpversion(),'5.0','<')) { 19 19 $err[] = sprintf(__('PHP version is %s (5.0 or earlier needed).'),phpversion()); 20 20 } 21 21 22 22 if (!function_exists('mb_detect_encoding')) { 23 23 $err[] = __('Multibyte string module (mbstring) is not available.'); 24 24 } 25 25 26 26 if (!function_exists('iconv')) { 27 27 $err[] = __('Iconv module is not available.'); 28 28 } 29 29 30 30 if (!function_exists('ob_start')) { 31 31 $err[] = __('Output control functions are not available.'); 32 32 } 33 33 34 34 if (!function_exists('simplexml_load_string')) { 35 35 $err[] = __('SimpleXML module is not available.'); 36 36 } 37 37 38 38 if (!function_exists('dom_import_simplexml')) { 39 39 $err[] = __('DOM XML module is not available.'); 40 40 } 41 41 42 42 $pcre_str = base64_decode('w6nDqMOgw6o='); 43 43 if (!@preg_match('/'.$pcre_str.'/u', $pcre_str)) { 44 44 $err[] = __('PCRE engine does not support UTF-8 strings.'); 45 45 } 46 46 47 47 if (!function_exists("spl_classes")) { 48 48 $err[] = __('SPL module is not available.'); 49 49 } 50 50 51 51 if ($con->driver() == 'mysql' || $con->driver() == 'mysqli') 52 52 { … … 65 65 } 66 66 } 67 67 68 68 if (!$innodb) { 69 69 $err[] = __('MySQL InnoDB engine is not available.'); … … 78 78 } 79 79 } 80 80 81 81 return count($err) == 0; 82 82 } 83 ?> -
admin/install/wizard.php
r1949 r2566 72 72 throw new Exception('<p>' . __($e->getMessage()) . '</p>'); 73 73 } 74 74 75 75 # Checks system capabilites 76 76 require dirname(__FILE__).'/check.php'; … … 79 79 throw new Exception('<p>'.__('Dotclear cannot be installed.').'</p><ul><li>'.implode('</li><li>',$_e).'</li></ul>'); 80 80 } 81 81 82 82 # Check if dotclear is already installed 83 83 $schema = dbSchema::init($con); … … 85 85 throw new Exception(__('Dotclear is already installed.')); 86 86 } 87 87 88 88 # Does config.php.in exist? 89 89 $config_in = dirname(__FILE__).'/../../inc/config.php.in'; … … 91 91 throw new Exception(sprintf(__('File %s does not exist.'),$config_in)); 92 92 } 93 93 94 94 # Can we write config.php 95 95 if (!is_writable(dirname(DC_RC_PATH))) { 96 96 throw new Exception(sprintf(__('Cannot write %s file.'),DC_RC_PATH)); 97 97 } 98 98 99 99 # Creates config.php file 100 100 $full_conf = file_get_contents($config_in); 101 101 102 102 writeConfigValue('DC_DBDRIVER',$DBDRIVER,$full_conf); 103 103 writeConfigValue('DC_DBHOST',$DBHOST,$full_conf); … … 106 106 writeConfigValue('DC_DBNAME',$DBNAME,$full_conf); 107 107 writeConfigValue('DC_DBPREFIX',$DBPREFIX,$full_conf); 108 108 109 109 $admin_url = preg_replace('%install/wizard.php$%','',$_SERVER['REQUEST_URI']); 110 110 writeConfigValue('DC_ADMIN_URL',http::getHost().$admin_url,$full_conf); 111 111 writeConfigValue('DC_ADMIN_MAILFROM','dotclear@'.$_SERVER['HTTP_HOST'],$full_conf); 112 112 writeConfigValue('DC_MASTER_KEY',md5(uniqid()),$full_conf); 113 113 114 114 $fp = @fopen(DC_RC_PATH,'wb'); 115 115 if ($fp === false) { … … 119 119 fclose($fp); 120 120 chmod(DC_RC_PATH, 0666); 121 121 122 122 $con->close(); 123 123 http::redirect('index.php?wiz=1'); … … 148 148 <meta name="GOOGLEBOT" content="NOSNIPPET" /> 149 149 <title><?php echo __('Dotclear installation wizard'); ?></title> 150 <link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 150 <link rel="stylesheet" href="../style/install.css" type="text/css" media="screen" /> 151 151 </head> 152 152
Note: See TracChangeset
for help on using the changeset viewer.