Всем привет.При подключение сайта через xampp возникает ошибка An internal server error occurred проект громадный и папки web нету есть папка frontend в котором находится index.php когда меняю код в нем
defined('YII_DEBUG') or define('YII_DEBUG', false);
на
defined('YII_DEBUG') or define('YII_DEBUG', true);
вот db.php
return [
'db' => [
'class' => yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=mysanatorium;',
'username' => 'root',
'password' => 'fm4Nrfnd3',
'charset' => 'utf8',
'tablePrefix' => 'fv_',
// Duration of schema cache.
'schemaCacheDuration' => 3600,
// Name of the cache component used to store schema information
'schemaCache' => 'cache',
'enableSchemaCache' => true,
],
'coredb' => [
'class' => yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=mysanatorium;',
'username' => 'root',
'password' => 'fm4Nrfnd3',
'charset' => 'utf8',
'tablePrefix' => 'fv_',
// Duration of schema cache.
'schemaCacheDuration' => 3600,
// Name of the cache component used to store schema information
'schemaCache' => 'cache',
'enableSchemaCache' => true,
],
];
показывает вот такую ошибку.Прошу не кидать помидоры я новичок в Yii и в PHP.Очень хотелось решить проблему так как уже неделью не могу установить сайт на локальный хост.
Проверьте параметры подключения к БД в конфиге. Сейчас ругается на то, что не может пользователь root подключиться к базе.
Создайте базу, взяв ее название из конфига в mysql. Файл sql - это дамп, нужно его импортировать в созданную базу, например через phpmyadmin.
Проблема было в том что только надо было удалить строку password и все
return [
'db' => [
'class' => yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=mysanatorium;',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'fv_',
// Duration of schema cache.
'schemaCacheDuration' => 3600,
// Name of the cache component used to store schema information
'schemaCache' => 'cache',
'enableSchemaCache' => true,
],
'coredb' => [
'class' => yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=mysanatorium;',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'fv_',
// Duration of schema cache.
'schemaCacheDuration' => 3600,
// Name of the cache component used to store schema information
'schemaCache' => 'cache',
'enableSchemaCache' => true,
],
];
Современные инструменты для криптотрейдинга: как технологии помогают принимать решения
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости