| | |
| | | |
| | | if($dist['id'] == '') die('Linux distribution or version not recognized.'); |
| | | |
| | | //** Check version |
| | | if(compare_ispconfig_version('3.0.3',ISPC_APP_VERSION) < 0) die('This updater is for ISPConfig versions > 3.0.3.0. Please Update to ISPConfig 3.0.3.3 first before you update to the current ISPConfig version.'); |
| | | |
| | | //** Include the distribution-specific installer class library and configuration |
| | | if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php'); |
| | | include_once('dist/lib/'.$dist['id'].'.lib.php'); |
| | |
| | | $conf["mysql"]["ispconfig_password"] = $conf_old["db_password"]; |
| | | $conf['language'] = $conf_old['language']; |
| | | if($conf['language'] == '{language}') $conf['language'] = 'en'; |
| | | $conf['timezone'] = $conf_old['timezone']; |
| | | if($conf['timezone'] == '{timezone}') $conf['timezone'] = 'UTC'; |
| | | |
| | | if(isset($conf_old["dbmaster_host"])) $conf["mysql"]["master_host"] = $conf_old["dbmaster_host"]; |
| | | if(isset($conf_old["dbmaster_database"])) $conf["mysql"]["master_database"] = $conf_old["dbmaster_database"]; |
| | |
| | | $clientdb_user = ''; |
| | | $clientdb_password = ''; |
| | | |
| | | //** Ask user for mysql admin_password if empty |
| | | if( empty($conf["mysql"]["admin_password"]) ) { |
| | | |
| | | $conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']); |
| | | } |
| | | //** Test mysql root connection |
| | | $finished = false; |
| | | do { |
| | | if(@mysql_connect($conf["mysql"]["host"],$conf["mysql"]["admin_user"],$conf["mysql"]["admin_password"])) { |
| | | $finished = true; |
| | | } else { |
| | | swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error()); |
| | | $conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']); |
| | | } |
| | | } while ($finished == false); |
| | | unset($finished); |
| | | |
| | | /* |
| | | * Prepare the dump of the database |
| | |
| | | |
| | | //* initialize the database |
| | | $inst->db = new db(); |
| | | $inst->db->dbName = $conf["mysql"]["database"]; |
| | | |
| | | //* initialize the master DB, if we have a multiserver setup |
| | | if($conf['mysql']['master_slave_setup'] == 'y') { |