Script written by Matthew Mecham
| > Date started: 19th March 2004
| > Updated for 2.1: 23 June 2005
|
+--------------------------------------------------------------------------
*/
error_reporting (E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);
//+------------------------------------------------------------------------
// ENTER YOUR PATH TO THE DIRECTORY THIS SCRIPT IS IN.
//+------------------------------------------------------------------------
// Tips:
//
// If you are using Windows and Apache, do not
// use backslashes, use normal forward slashes.
// You may need to remove the drive letter also
// Example: C:\apache\htdocs\ibforums\ will need
// to be: /apache/htdocs/ibforums/
//
// If you are using Windows and IIS, then you will
// need to enter double backslashes.
//
// In all cases, please enter a trailing slash (or
// trailing backslashes...)
//+------------------------------------------------------------------------
define( 'THIS_ROOT_PATH', './' );
//+------------------------------------------------------------------------
// ROOT TO REST OF IPB (SHOULD BE ABLE TO LEAVE AS-IS
//+------------------------------------------------------------------------
define( 'ROOT_PATH', '../' );
//-----------------------------------------------
// NO USER EDITABLE SECTIONS BELOW
//-----------------------------------------------
define( 'KERNEL_PATH', ROOT_PATH.'ips_kernel/' );
define( 'CACHE_PATH' , ROOT_PATH );
define ( 'IN_ACP', 1 );
define ( 'IN_IPB', 1 );
define ( 'IN_DEV', 0 );
define ( 'IPBVERSION', '2.1.7' );
define ( 'IPB_LONG_VERSION', '21013.60712.u' );
define ( 'USE_SHUTDOWN', 0 );
define ( 'SAFE_MODE_ON', 0 );
$INFO = array();
//--------------------------------
// Load our classes
//--------------------------------
require ROOT_PATH . "sources/ipsclass.php";
require KERNEL_PATH . "class_converge.php";
# Initiate super-class
$ipsclass = new ipsclass();
$ipsclass->vars = $INFO;
$ipsclass->template = new template();
//--------------------------------
// Set up our vars
//--------------------------------
$ipsclass->parse_incoming();
$ipsclass->initiate_ipsclass();
//--------------------------------
// Set converge
//--------------------------------
$ipsclass->converge = new class_converge( $ipsclass->DB );
//---------------------------------------
// Installer locked?
//---------------------------------------
if ( file_exists( THIS_ROOT_PATH.'install.lock') )
{
install_error("Скрипт установки заблокирован!
Пожалуйста, (через FTP) удалите файл 'install/install.lock'");
exit();
}
//---------------------------------------
// Make sure we've renamed conf_global.php
//---------------------------------------
if ( file_exists( ROOT_PATH.'conf_global.php.dist') AND ! file_exists( ROOT_PATH.'conf_global.php') )
{
if ( ! @rename( ROOT_PATH.'conf_global.php.dist', ROOT_PATH.'conf_global.php' ) )
{
install_error("
![]() |
Прежде чем мы начнем установку форума, пожалуйста, проверьте, все ли файлы загружены на сервер, возможна ли запись в файл 'conf_global.php' (права CHMOD на файл должны быть 0666). IPB ".IPBVERSION." требует PHP 4.3.0 или выше и SQL базу данных. Вы также нуждаетесь в следующей информации, которую вам должен продоставить ваш хостинг-провайдер:
Когда вы нажмете на кнопку «Далее», вам будет дана форма для ввода всей необходимой для установки форума информации. ПОЖАЛУЙСТА, ПОМНИТЕ: ИСПОЛЬЗУЯ ЭТОТ СКРИПТ УСТАНОВКИ, ВЫ УДАЛИТЕ ЛЮБУЮ ТЕКУЩУЮ, ИМЕЮЩУЮСЯ БАЗУ ДАННЫХ ФОРУМА INVISION POWER BOARD, ЕСЛИ ИСПОЛЬЗУЕТЕ ТАКОЙ ЖЕ ПРЕФИКС ТАБЛИЦ. "; //--------------------------------------- // Check to make sure that the config file // is there and it's got suitable permissions to write to: //--------------------------------------- $file = ROOT_PATH."conf_global.php"; $templates = THIS_ROOT_PATH."installfiles/ipb_templates.xml"; $warnings = array(); $checkfiles = array( ROOT_PATH ."ipb_templates.xml", THIS_ROOT_PATH."installfiles/components.php", THIS_ROOT_PATH."installfiles/ipb_macro.xml", THIS_ROOT_PATH."installfiles/ipb_settings.xml", THIS_ROOT_PATH."sql", KERNEL_PATH ."class_converge.php", KERNEL_PATH ."class_xml.php", ROOT_PATH ."conf_global.php" ); $writeable = array( ROOT_PATH."conf_global.php", ROOT_PATH."cache", ROOT_PATH."cache/lang_cache/", ROOT_PATH."cache/skin_cache/" ); foreach ( $checkfiles as $cf ) { if ( ! file_exists($cf) ) { $warnings[] = "Невозможно найти файл '$cf'."; } } foreach ( $writeable as $cf ) { if ( ! is_writeable($cf) ) { $warnings[] = "Невозможно произвести запись в файл '$cf'. Пожалуйста, установите права доступа к файлу (CHMOD) - 0777."; } } $phpversion = phpversion(); //---------------------------------- // CHECK BASICS //---------------------------------- if ($phpversion < '4.1.0') { $warnings[] = "Вы не сможете установить Invision Power Board. IPB требует PHP версии 4.1.0 или выше."; } if ( ! function_exists('get_cfg_var') ) { $warnings[] = "Вы не сможете установить Invision Power Board. Ваша поставка PHP не достаточна, чтобы запустить IPB."; } if ( ! function_exists('xml_parse_into_struct') ) { $warnings[] = "Вы не сможете установить Invision Power Board. IPB требует, чтобы XML-функции в PHP были включены. Пожалуйста, попросите вашего хостинг-провайдера включить поддержку XML."; } //---------------------------------- // Got error? //---------------------------------- if ( count($warnings) > 0 ) { $err_string = '·'.implode( " ·", $warnings ); $ipsclass->template->contents .= "
Внимание!
Указанные ниже ошибки должны быть обязательно исправлены перед тем, как продолжить!
";
}
else
{
$ipsclass->template->contents .= "$err_string "; } $ipsclass->template->contents .= " |