R
R
Radiss2019-03-18 05:38:58
1C-Bitrix
Radiss, 2019-03-18 05:38:58

How to set up a Bitrix database on a local server after transferring from hosting with a tar archive?

I'm only interested in this option, since the others are not viable on my software.
The archive was unpacked into dir. D:\ASITES\madeirrf\public_html
ASITES - root
file for all projects D:\ASITES\madeirrf\public_html\bitrix\settings.php

spoiler
<?php

return array (
  'utf_mode' => 
  array (
    'value' => true,
    'readonly' => true,
  ),
  'cache_flags' => 
  array (
    'value' => 
    array (
      'config_options' => 3600.0,
      'site_domain' => 3600.0,
    ),
    'readonly' => false,
  ),
  'cookies' => 
  array (
    'value' => 
    array (
      'secure' => false,
      'http_only' => true,
    ),
    'readonly' => false,
  ),
  'exception_handling' => 
  array (
    'value' => 
    array (
      'debug' => false,
      'handled_errors_types' => 4437,
      'exception_errors_types' => 4437,
      'ignore_silence' => false,
      'assertion_throws_exception' => true,
      'assertion_error_type' => 256,
      'log' => NULL,
    ),
    'readonly' => false,
  ),
  'connections' => 
  array (
    'value' => 
    array (
      'default' => 
      array (
        'className' => '\\Bitrix\\Main\\DB\\MysqliConnection',
        'host' => 'localhost',
        'database' => 'madeirrf_root',
        'login' => 'root',
      //  'login' => 'изменён',
        //'password' => 'изменён'
        'password' => '',
        
        'options' => 2.0,
      ),
    ),
    'readonly' => true,
  ),
  'crypto' => 
  array (
    'value' => 
    array (
      'crypto_key' => 'dcb2c6b807599a583c2808309aede910',
    ),
    'readonly' => true,
  ),
);

D:\ASITES\madeirrf\public_html\bitrix\php_interface\dbconn
spoiler
<?
define("BX_USE_MYSQLI", true);
define("DBPersistent", false);
$DBType = "mysql";
$DBHost = "localhost";
//$DBLogin = "изменён";
$DBLogin = "root";
//$DBPassword = "изменён";
$DBPassword = "";
$DBName = "madeirrf_root";
$DBDebug = true;
$DBDebugToFile = false;
define("MYSQL_TABLE_TYPE", "INNODB");

define("DELAY_DB_CONNECT", true);
define("CACHED_b_file", 3600);
define("CACHED_b_file_bucket_size", 10);
define("CACHED_b_lang", 3600);
define("CACHED_b_option", 3600);
define("CACHED_b_lang_domain", 3600);
define("CACHED_b_site_template", 3600);
define("CACHED_b_event", 3600);
define("CACHED_b_agent", 3660);
define("CACHED_menu", 3600);

define("BX_UTF", true);
define("BX_FILE_PERMISSIONS", 0644);
define("BX_DIR_PERMISSIONS", 0755);
@umask(~(BX_FILE_PERMISSIONS|BX_DIR_PERMISSIONS)&0777);
define("BX_DISABLE_INDEX_PAGE", true);
?>

DB moved to a local one called madeirrf_root
What else needs to be changed?
Now the error is the following:
Warning: require(D:/ASITES/madeirrf/bitrix/header.php): failed to open stream: No such file or directory in D:\ASITES\madeirrf\public_html\index.php on line 2
madeirrf/public_html
Fatal error: require(): Failed opening required 'D:/ASITES/madeirrf/bitrix/header.php' (include_path='.;w:/modules/php/PHP-7.1-x64;w:/modules/php/PHP-7.1 -x64/PEAR/pear') in D:\ASITES\madeirrf\public_html\index.php on line 2

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vadim, 2019-03-18
@supgordan

Are you sure you got everything right?

S
Sowander, 2019-03-24
@Sowander

what is not clear here Failed opening required 'D:/ASITES/madeirrf/bitrix/header.php' ?)
you have $_SERVER['DOCUMENT_ROOT'] = D:\ASITES\madeirrf\
and Bitrix wants DOCUMENT_ROOT to be D:\ASITES \madeirrf\public_html\
the decision to
move everything from the public_html folder to madeirrf
and the DB is never the culprit here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question