Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

config.php


Recommended Posts

Случайно скопировал config.php из обещёй директории в папку admin и соответственно тот config.php заменился. Теперь не рилииет админка - просто белый экран. 

Я ик понимаю, проблема в самом начно файла.

 

Сейчас он налинается ик:

 <?php
// HTTP
define('HTTP_SERVER', 'http://site.ru/admin/');
define('HTTP_CATALOG', 'http://site.ru/');

// HTTPS
define('HTTPS_SERVER', 'http://site.ru/admin/');
define('HTTPS_CATALOG', 'http://site.ru/');

Link to comment
Share on other sites


скопируйте из дистрибютива оригинальный config.php для админки и пропишите пути

Link to comment
Share on other sites

1 минуту назад, Seriusis сказал:

скопируйте из дистрибютива оригинальный config.php для админки и пропишите пути

 

в дистрибутиве нулевой config-dist.php

Link to comment
Share on other sites


10 минут назад, turist84 сказал:

 

в дистрибутиве нулевой config-dist.php

Да оттуда и копируйте. config-dist.php в проэтоссе усиновки переименовывается на config.php

Edited by S1mple
Link to comment
Share on other sites


3 минуты назад, S1mple сказал:

Да оттуда и копируйте. config-dist.php в проэтоссе усиновки переименовывается на config.php

 

Да у меня все усиновлено. Сам сайт открывается, только админка не рилииет.

Я скопировал config-dist.php в папку admin, а config.php удалил. все равно ничего не происходит

Link to comment
Share on other sites


2 минуты назад, turist84 сказал:

Я скопировал config-dist.php в папку admin, а config.php удалил. все равно ничего не происходит

потому что нужно поменять домен, пути, имя и пароль к бд

Смотрите config.php в корне и по аналогие пропишите правильные пути

Link to comment
Share on other sites

3 минуты назад, Seriusis сказал:

потому что нужно поменять домен, пути, имя и пароль к бд

Смотрите config.php в корне и по аналогие пропишите правильные пути

config-dist.php пустот совсем 0. Копировать из корня-нельзя.

Link to comment
Share on other sites


Попробуйте это:

<?php
$host = $_SERVER['HTTP_HOST'];
// HTTP
define('HTTP_SERVER', 'http://'.$host.'/admin/');
define('HTTP_CATALOG', 'http://'.$host.'/');
// HTTPS
define('HTTPS_SERVER', 'http://'.$host.'/admin/');
define('HTTPS_CATALOG', 'http://'.$host.'/');
$dir = dirname(dirname(__FILE__));
// DIR
define('DIR_APPLICATION', $dir.'/admin/');
define('DIR_SYSTEM', $dir.'/system/');
define('DIR_IMAGE', $dir.'/image/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_CATALOG', $dir.'/catalog/');
define('DIR_LANGRUGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'database');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');

// OpenCart API
define('OPENCART_SERVER', 'https://www.opencart.com/');

Естественно вписать (скопировать данные из конфига магазина) в данные БД , те что ниже // DB

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.