Добрый день! Решил воспользоваться вашим хостингом.
При попытке входа на http://lenina105.adr.com.ua/users/login
получаю вот такую ошибку: If you are using SQL keywords as table column names, you can enable identifier quoting for your database connection in config/app.php.
Рекомендации cake по настройке app.php выполнил: 'quoteIdentifiers' => true,
на локалке все было ОК.
<?php
return [
'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),
'App' => [
'namespace' => 'App',
'encoding' => env('APP_ENCODING', 'UTF-8'),
'defaultLocale' => env('APP_DEFAULT_LOCALE', 'en_US'),
'base' => false,
'dir' => 'src',
'webroot' => 'webroot',
'wwwRoot' => WWW_ROOT,
// 'baseUrl' => env('SCRIPT_NAME'),
'fullBaseUrl' => false,
'imageBaseUrl' => 'img/',
'cssBaseUrl' => 'css/',
'jsBaseUrl' => 'js/',
'paths' => [
'plugins' => [ROOT . DS . 'plugins' . DS],
'templates' => [APP . 'Template' . DS],
'locales' => [APP . 'Locale' . DS],
],
],
'Security' => [
],
'Asset' => [
// 'timestamp' => true,
],
/**
* Configure the cache adapters.
*/
'Cache' => [
'default' => [
'className' => 'File',
'path' => CACHE,
'url' => env('CACHE_DEFAULT_URL', null),
],
'_cake_core_' => [
'className' => 'File',
'prefix' => 'myapp_cake_core_',
'path' => CACHE . 'persistent/',
'serialize' => true,
'duration' => '+2 minutes',
'url' => env('CACHE_CAKECORE_URL', null),
],
'_cake_model_' => [
'className' => 'File',
'prefix' => 'myapp_cake_model_',
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+2 minutes',
'url' => env('CACHE_CAKEMODEL_URL', null),
],
],
'Error' => [
'errorLevel' => E_ALL & ~E_DEPRECATED,
'exceptionRenderer' => 'Cake\Error\ExceptionRenderer',
'skipLog' => [],
'log' => true,
'trace' => true,
],
'EmailTransport' => [
'default' => [
'className' => 'Mail',
// The following keys are used in SMTP transports
'host' => 'localhost',
'port' => 25,
'timeout' => 30,
'username' => 'user',
'password' => 'secret',
'client' => null,
'tls' => null,
'url' => env('EMAIL_TRANSPORT_DEFAULT_URL', null),
],
],
'Email' => [
'default' => [
'transport' => 'default',
'from' => 'you@localhost',
//'charset' => 'utf-8',
//'headerCharset' => 'utf-8',
],
],
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
//'port' => 'non_standard_port_number',
'username' => '************',
'password' => '*************',
'database' => 'cake335',
'encoding' => 'utf8',
'timezone' => 'UTC',
'flags' => [],
'cacheMetadata' => true,
'log' => false,
/**
* Set identifier quoting to true if you are using reserved words or
* special characters in your table or column names. Enabling this
* setting will result in queries built using the Query Builder having
* identifiers quoted when creating SQL. It should be noted that this
* decreases performance because each query needs to be traversed and
* manipulated before being executed.
*/
'quoteIdentifiers' => true,
//'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
'url' => env('DATABASE_URL', null),
],
],
/**
* Configures logging options
*/
'Log' => [
'debug' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'debug',
'levels' => ['notice', 'info', 'debug'],
'url' => env('LOG_DEBUG_URL', null),
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
'url' => env('LOG_ERROR_URL', null),
],
],
'Session' => [
'defaults' => 'php',
],
];
Cakephp 3.0 identifier quoting
- alexbel
- Друг Zzz
- Сообщения: 137
- Зарегистрирован: Пт мар 11, 2016 5:58 am
- Откуда: Беларусь
- Пол:
- Агент пользователя:
- Контактная информация:
Cakephp 3.0 identifier quoting
Во время импорта базы данных Вы кодировку меняли базы на хостинге? У вас на сайте я только что посмотрел стоит UTF-8:
Базы данных на хостинге ZZZ по умолчанию создаются в кодировке 1251, отличие кодировки сайта от кодировки в MYSQL приводит к различным ошибкам. Вы в применяли к базе данных MYSQL следующий SQL-запрос?
После ответа Вами на выше поставленные вопросы, можно двигаться дальше в случае возникновения ошибок. Ну а пока, это первое на что стоит обратить внимание.
Так же что то напрягает параметр в ошибке:
Но для начала давайте определимся с кодировкой...
Код: Выделить всё
<meta charset="utf-8"/>
Код: Выделить всё
ALTER DATABASE НАЗВАНИЕ_ВАШЕЙ_БД DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Так же что то напрягает параметр в ошибке:
Код: Выделить всё
'base' => false,
- Helenwatcher
- Сообщения: 5476
- Зарегистрирован: Чт ноя 24, 2022 7:43 am
- Пол:
- Агент пользователя:
Cakephp 3.0 identifier quoting
https://www.racked.com/users/Anitawatches
https://is.gd/o50pzr
https://is.gd/UFNai6
https://is.gd/9hyN7C
https://is.gd/SMV8Yd
https://is.gd/ag2Lbz
https://www.sbnation.com/users/Anitawatches
https://tinyurl.com/yebp34fw
https://tinyurl.com/zyctd64c
https://tinyurl.com/yc78t5bw
https://tinyurl.com/2h4yhwd8
https://tinyurl.com/2rjt5cb5
https://sketchfab.com/Anitawatches
http://tiny.cc/26u3vz
http://tiny.cc/48u3vz
http://tiny.cc/16u3vz
http://tiny.cc/38u3vz
http://tiny.cc/46u3vz
http://www.video-bookmark.com/bookmark/ ... -replicas/
https://rebrand.ly/5jlag2f
https://rebrand.ly/q34fa6t
https://rebrand.ly/8eahm4r
https://rebrand.ly/a3h8b90
https://rebrand.ly/9n9y6j4
https://weheartit.com/anitawatches6
https://is.gd/o50pzr
https://is.gd/UFNai6
https://is.gd/9hyN7C
https://is.gd/SMV8Yd
https://is.gd/ag2Lbz
https://www.sbnation.com/users/Anitawatches
https://tinyurl.com/yebp34fw
https://tinyurl.com/zyctd64c
https://tinyurl.com/yc78t5bw
https://tinyurl.com/2h4yhwd8
https://tinyurl.com/2rjt5cb5
https://sketchfab.com/Anitawatches
http://tiny.cc/26u3vz
http://tiny.cc/48u3vz
http://tiny.cc/16u3vz
http://tiny.cc/38u3vz
http://tiny.cc/46u3vz
http://www.video-bookmark.com/bookmark/ ... -replicas/
https://rebrand.ly/5jlag2f
https://rebrand.ly/q34fa6t
https://rebrand.ly/8eahm4r
https://rebrand.ly/a3h8b90
https://rebrand.ly/9n9y6j4
https://weheartit.com/anitawatches6