<p>This exactly what happened. Thank you for your help! This is the line that I added: </p>

<pre><code>'initSQLs' =&gt; array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';") 
</code></pre>

<p>I was updating my sever environment and needed this for Craft 2.6 to work with MySQL 5.5 and higher. It was a work around that the Pixel &amp; Tonic team provided awhile back. Thanks for pointing me in the right direction.</p>

CC BY-SA 3.0
2018-04-23T01:07:51.453Z
2018-04-23T01:07:51.453Z
vcao
<p>I'm working on upgrading an existing Craft 2.6 site to Craft 3.0.3.1 on my development server with official documentation that was <a href="https://docs.craftcms.com/v3/upgrade.html#if-you-want-to-keep-your-current-directory-structure" rel="nofollow noreferrer">provided</a>. I keep running into an Internal Server Error. I checked the logs and I'm looking to get pointed in the right direction if anyone has any tips. I checked other questions on this, and haven't seen anything specific to this issue.</p>

<p>Error logs:</p>

<pre><code>[22-Apr-2018 20:23:26 UTC] An Error occurred while handling another 

error:
yii\base\UnknownPropertyException: Setting unknown property: craft\config\DbConfig::initSQLs in /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\BaseObject-&gt;__set('initSQLs', Array)
#1 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\config\DbConfig), Array)
#2 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): yii\base\BaseObject-&gt;__construct(Array)
#3 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(135): craft\services\Config-&gt;getConfigSettings('db')
#4 /var/www/craft/vendor/craftcms/cms/src/config/app.php(203): craft\services\Config-&gt;getDb()
#5 [internal function]: {closure}()
#6 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#7 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
#8 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#9 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('db', true)
#10 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module-&gt;get('db', true)
#11 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(499): craft\web\Application-&gt;get('db')
#12 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(600): yii\base\Application-&gt;getDb()
#13 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(222): craft\web\Application-&gt;getIsDbConnectionValid()
#14 /var/www/craft/vendor/craftcms/cms/src/services/Deprecator.php(60): craft\web\Application-&gt;getIsInstalled()
#15 /var/www/craft/vendor/craftcms/cms/src/config/GeneralConfig.php(673): craft\services\Deprecator-&gt;log('environmentVari...', 'The environment...')
#16 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): craft\config\GeneralConfig-&gt;__construct(Array)
#17 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(145): craft\services\Config-&gt;getConfigSettings('general')
#18 /var/www/craft/vendor/craftcms/cms/src/config/app.web.php(19): craft\services\Config-&gt;getGeneral()
#19 [internal function]: {closure}()
#20 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#21 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
#22 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#23 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('request', true)
#24 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module-&gt;get('request', true)
#25 /var/www/craft/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application-&gt;get('request')
#26 /var/www/craft/vendor/craftcms/cms/src/web/Controller.php(78): yii\web\Application-&gt;getRequest()
#27 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('render-error', Array)
#28 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(267): yii\base\Module-&gt;runAction('templates/rende...', Array)
#29 /var/www/craft/vendor/yiisoft/yii2/web/ErrorHandler.php(108): craft\web\Application-&gt;runAction('templates/rende...')
#30 /var/www/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(156): yii\web\ErrorHandler-&gt;renderException(Object(yii\base\UnknownPropertyException))
#31 /var/www/craft/vendor/yiisoft/yii2/base/ErrorHandler.php(111): craft\web\ErrorHandler-&gt;renderException(Object(yii\base\UnknownPropertyException))
#32 /var/www/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(71): yii\base\ErrorHandler-&gt;handleException(Object(yii\base\UnknownPropertyException))
#33 [internal function]: craft\web\ErrorHandler-&gt;handleException(Object(yii\base\UnknownPropertyException))
#34 {main}
Previous exception:
yii\base\UnknownPropertyException: Setting unknown property: craft\config\DbConfig::initSQLs in /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\BaseObject-&gt;__set('initSQLs', Array)
#1 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\config\DbConfig), Array)
#2 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): yii\base\BaseObject-&gt;__construct(Array)
#3 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(135): craft\services\Config-&gt;getConfigSettings('db')
#4 /var/www/craft/vendor/craftcms/cms/src/config/app.php(203): craft\services\Config-&gt;getDb()
#5 [internal function]: {closure}()
#6 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#7 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
#8 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#9 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('db', true)
#10 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module-&gt;get('db', true)
#11 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(499): craft\web\Application-&gt;get('db')
#12 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(600): yii\base\Application-&gt;getDb()
#13 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(222): craft\web\Application-&gt;getIsDbConnectionValid()
#14 /var/www/craft/vendor/craftcms/cms/src/services/Deprecator.php(60): craft\web\Application-&gt;getIsInstalled()
#15 /var/www/craft/vendor/craftcms/cms/src/config/GeneralConfig.php(673): craft\services\Deprecator-&gt;log('environmentVari...', 'The environment...')
#16 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): craft\config\GeneralConfig-&gt;__construct(Array)
#17 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(145): craft\services\Config-&gt;getConfigSettings('general')
#18 /var/www/craft/vendor/craftcms/cms/src/config/app.web.php(19): craft\services\Config-&gt;getGeneral()
#19 [internal function]: {closure}()
#20 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#21 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container-&gt;invoke(Object(Closure), Array)
#22 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#23 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator-&gt;get('request', true)
#24 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module-&gt;get('request', true)
#25 /var/www/craft/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application-&gt;get('request')
#26 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(107): yii\web\Application-&gt;getRequest()
#27 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(273): craft\web\Application-&gt;bootstrap()
#28 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(93): yii\base\Application-&gt;init()
#29 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application-&gt;init()
#30 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject-&gt;__construct(Array)
#31 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(85): yii\base\Application-&gt;__construct(Array)
#32 [internal function]: craft\web\Application-&gt;__construct(Array)
#33 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass-&gt;newInstanceArgs(Array)
#34 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container-&gt;build('craft\\web\\Appli...', Array, Array)
#35 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container-&gt;get('craft\\web\\Appli...', Array, Array)
#36 /var/www/craft/vendor/craftcms/cms/bootstrap/bootstrap.php(249): yii\BaseYii::createObject(Array)
#37 /var/www/craft/vendor/craftcms/cms/bootstrap/web.php(42): require('/var/www/craft/...')
#38 /var/www/public/index.php(14): require('/var/www/craft/...')
#39 {main}
$_SERVER = [
    'REDIRECT_STATU
S' =&gt; '200',
    'HTTP_HOST' =&gt; 'homeaidoc.test',
    'HTTP_CONNECTION' =&gt; 'keep-alive',
    'HTTP_UPGRADE_INSECURE_REQUESTS' =&gt; '1',
    'HTTP_USER_AGENT' =&gt; 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36',
    'HTTP_ACCEPT' =&gt; 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
    'HTTP_ACCEPT_ENCODING' =&gt; 'gzip, deflate',
    'HTTP_ACCEPT_LANGUAGE' =&gt; 'en-US,en;q=0.9',
    'HTTP_COOKIE' =&gt; 'YII_CSRF_TOKEN=d84a6a7469791b5a01aa759647795df386aa7292s%3A81%3A%221ctj6EdpYYbzJgTL8duqMe5BRaYB0QEIxQZCPZzZ%7Cdf07c76fcbed073a07511bd5e063e3567f042e1d%22%3B; 1031b8c41dfff97a311a7ac99863bdc5_username=e910b225ebf1bd323b2e632b610bc5b29d0ca26665a484ee6e037738c1a43e63a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A9%3A%22homeaidoc%22%3B%7D; __stripe_mid=9e5a2844-086d-4ba9-8344-5d1358d2ed5e; CRAFT_CSRF_TOKEN=fdcfb3a08e59d1514a73ab02b732715a56eebd731d04018430f87e4ceeab268ca%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A40%3A%22gqlZV4dhqH9VxXItR7_TkDzV1mLlYWrpxt8B_amI%22%3B%7D; 6c228aef999c7557f40c51680fd797c2username=2956940bf1a165db1f4950fc46ebe6f9b80651b4s%3A64%3A%225fcd775cdc3be4989c0a2e2d0a919d386291f6abczo5OiJob21lYWlkb2MiOw%3D%3D%22%3B; CraftSessionId=9mhet7l9ps64j7c7jtmvvr75qc; __stripe_sid=71a94e68-68bd-4676-8023-6291dc3f0532; 6c228aef999c7557f40c51680fd797c2=7d06e757b13921230209a5bd10fdc29eb1cae5c5s%3A400%3A%22dfe5bef72d444908a70f64cb5589282e5fdd9e35YTo2OntpOjA7czo5OiJob21lYWlkb2MiO2k6MTtzOjMyOiJJTVNYUnNkdHYwUXF1R1hoRzJ%2BenE0S3AyX1FlR2NIayI7aToyO3M6MzY6ImQ1NjM3YzZmLTE5MDItNGNjMS1iYzQyLTM3YTRiNGI2MTNhMiI7aTozO2k6MDtpOjQ7czoxMjE6Ik1vemlsbGEvNS4wIChNYWNpbnRvc2g7IEludGVsIE1hYyBPUyBYIDEwXzEzXzQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS82Ni4wLjMzNTkuMTE3IFNhZmFyaS81MzcuMzYiO2k6NTthOjA6e319%22%3B',
    'PATH' =&gt; '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
    'SERVER_SIGNATURE' =&gt; '&lt;address&gt;Apache/2.4.29 (Ubuntu) Server at homeaidoc.test Port 80&lt;/address&gt;
',
    'SERVER_SOFTWARE' =&gt; 'Apache/2.4.29 (Ubuntu)',
    'SERVER_NAME' =&gt; 'homeaidoc.test',
    'SERVER_ADDR' =&gt; '192.168.33.10',
    'SERVER_PORT' =&gt; '80',
    'REMOTE_ADDR' =&gt; '192.168.33.1',
    'DOCUMENT_ROOT' =&gt; '/var/www/public',
    'REQUEST_SCHEME' =&gt; 'http',
    'CONTEXT_PREFIX' =&gt; '',
    'CONTEXT_DOCUMENT_ROOT' =&gt; '/var/www/public',
    'SERVER_ADMIN' =&gt; 'webmaster@localhost',
    'SCRIPT_FILENAME' =&gt; '/var/www/public/index.php',
    'REMOTE_PORT' =&gt; '58251',
    'REDIRECT_URL' =&gt; '/admin',
    'REDIRECT_QUERY_STRING' =&gt; 'p=admin',
    'GATEWAY_INTERFACE' =&gt; 'CGI/1.1',
    'SERVER_PROTOCOL' =&gt; 'HTTP/1.1',
    'REQUEST_METHOD' =&gt; 'GET',
    'QUERY_STRING' =&gt; 'p=admin',
    'REQUEST_URI' =&gt; '/admin',
    'SCRIPT_NAME' =&gt; '/index.php',
    'PHP_SELF' =&gt; '/index.php',
    'REQUEST_TIME_FLOAT' =&gt; 1524428606.937,
    'REQUEST_TIME' =&gt; 1524428606,
]
</code></pre>

CC BY-SA 3.0
2018-04-22T21:09:18.810Z
Seems like there is an error in your `db.php` config. Could you share your configuration?
Robin Schambach
CC BY-SA 3.0
2018-04-23T00:56:14.673Z
This exactly what happened. Thank you for your help! This is the line that I added:  

'initSQLs' => array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';")

I was updating my sever environment and needed this for Craft 2.6 to work with MySQL 5.5 and higher. It was a work around that the Pixel & Tonic team provided awhile back.
vcao
<craft3>
Upgrade 2 to 3 Using Current Directory Structure
# Upgrade 2 to 3 Using Current Directory Structure

(Asked by: username_0 on 2018-04-22)

I'm working on upgrading an existing Craft 2.6 site to Craft 3.0.3.1 on my development server with official documentation that was provided. I keep running into an Internal Server Error. I checked the logs and I'm looking to get pointed in the right direction if anyone has any tips. I checked other questions on this, and haven't seen anything specific to this issue.
Error logs:
[22-Apr-2018 20:23:26 UTC] An Error occurred while handling another 

error:
yii\base\UnknownPropertyException: Setting unknown property: craft\config\DbConfig::initSQLs in /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\BaseObject->__set('initSQLs', Array)
#1 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\config\DbConfig), Array)
#2 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): yii\base\BaseObject->__construct(Array)
#3 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(135): craft\services\Config->getConfigSettings('db')
#4 /var/www/craft/vendor/craftcms/cms/src/config/app.php(203): craft\services\Config->getDb()
#5 [internal function]: {closure}()
#6 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#7 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#8 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#9 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('db', true)
#10 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module->get('db', true)
#11 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(499): craft\web\Application->get('db')
#12 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(600): yii\base\Application->getDb()
#13 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(222): craft\web\Application->getIsDbConnectionValid()
#14 /var/www/craft/vendor/craftcms/cms/src/services/Deprecator.php(60): craft\web\Application->getIsInstalled()
#15 /var/www/craft/vendor/craftcms/cms/src/config/GeneralConfig.php(673): craft\services\Deprecator->log('environmentVari...', 'The environment...')
#16 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): craft\config\GeneralConfig->__construct(Array)
#17 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(145): craft\services\Config->getConfigSettings('general')
#18 /var/www/craft/vendor/craftcms/cms/src/config/app.web.php(19): craft\services\Config->getGeneral()
#19 [internal function]: {closure}()
#20 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#21 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#22 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#23 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
#24 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module->get('request', true)
#25 /var/www/craft/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application->get('request')
#26 /var/www/craft/vendor/craftcms/cms/src/web/Controller.php(78): yii\web\Application->getRequest()
#27 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render-error', Array)
#28 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(267): yii\base\Module->runAction('templates/rende...', Array)
#29 /var/www/craft/vendor/yiisoft/yii2/web/ErrorHandler.php(108): craft\web\Application->runAction('templates/rende...')
#30 /var/www/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(156): yii\web\ErrorHandler->renderException(Object(yii\base\UnknownPropertyException))
#31 /var/www/craft/vendor/yiisoft/yii2/base/ErrorHandler.php(111): craft\web\ErrorHandler->renderException(Object(yii\base\UnknownPropertyException))
#32 /var/www/craft/vendor/craftcms/cms/src/web/ErrorHandler.php(71): yii\base\ErrorHandler->handleException(Object(yii\base\UnknownPropertyException))
#33 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\base\UnknownPropertyException))
#34 {main}
Previous exception:
yii\base\UnknownPropertyException: Setting unknown property: craft\config\DbConfig::initSQLs in /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php:163
Stack trace:
#0 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\BaseObject->__set('initSQLs', Array)
#1 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(craft\config\DbConfig), Array)
#2 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): yii\base\BaseObject->__construct(Array)
#3 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(135): craft\services\Config->getConfigSettings('db')
#4 /var/www/craft/vendor/craftcms/cms/src/config/app.php(203): craft\services\Config->getDb()
#5 [internal function]: {closure}()
#6 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#7 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#8 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#9 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('db', true)
#10 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module->get('db', true)
#11 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(499): craft\web\Application->get('db')
#12 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(600): yii\base\Application->getDb()
#13 /var/www/craft/vendor/craftcms/cms/src/base/ApplicationTrait.php(222): craft\web\Application->getIsDbConnectionValid()
#14 /var/www/craft/vendor/craftcms/cms/src/services/Deprecator.php(60): craft\web\Application->getIsInstalled()
#15 /var/www/craft/vendor/craftcms/cms/src/config/GeneralConfig.php(673): craft\services\Deprecator->log('environmentVari...', 'The environment...')
#16 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(99): craft\config\GeneralConfig->__construct(Array)
#17 /var/www/craft/vendor/craftcms/cms/src/services/Config.php(145): craft\services\Config->getConfigSettings('general')
#18 /var/www/craft/vendor/craftcms/cms/src/config/app.web.php(19): craft\services\Config->getGeneral()
#19 [internal function]: {closure}()
#20 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(503): call_user_func_array(Object(Closure), Array)
#21 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(351): yii\di\Container->invoke(Object(Closure), Array)
#22 /var/www/craft/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject(Object(Closure))
#23 /var/www/craft/vendor/yiisoft/yii2/base/Module.php(742): yii\di\ServiceLocator->get('request', true)
#24 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(318): yii\base\Module->get('request', true)
#25 /var/www/craft/vendor/yiisoft/yii2/web/Application.php(160): craft\web\Application->get('request')
#26 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(107): yii\web\Application->getRequest()
#27 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(273): craft\web\Application->bootstrap()
#28 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(93): yii\base\Application->init()
#29 /var/www/craft/vendor/yiisoft/yii2/base/BaseObject.php(109): craft\web\Application->init()
#30 /var/www/craft/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#31 /var/www/craft/vendor/craftcms/cms/src/web/Application.php(85): yii\base\Application->__construct(Array)
#32 [internal function]: craft\web\Application->__construct(Array)
#33 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(383): ReflectionClass->newInstanceArgs(Array)
#34 /var/www/craft/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('craft\\web\\Appli...', Array, Array)
#35 /var/www/craft/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('craft\\web\\Appli...', Array, Array)
#36 /var/www/craft/vendor/craftcms/cms/bootstrap/bootstrap.php(249): yii\BaseYii::createObject(Array)
#37 /var/www/craft/vendor/craftcms/cms/bootstrap/web.php(42): require('/var/www/craft/...')
#38 /var/www/public/index.php(14): require('/var/www/craft/...')
#39 {main}
$_SERVER = [
    'REDIRECT_STATU
S' => '200',
    'HTTP_HOST' => 'homeaidoc.test',
    'HTTP_CONNECTION' => 'keep-alive',
    'HTTP_UPGRADE_INSECURE_REQUESTS' => '1',
    'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36',
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate',
    'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.9',
    'HTTP_COOKIE' => 'YII_CSRF_TOKEN=d84a6a7469791b5a01aa759647795df386aa7292s%3A81%3A%221ctj6EdpYYbzJgTL8duqMe5BRaYB0QEIxQZCPZzZ%7Cdf07c76fcbed073a07511bd5e063e3567f042e1d%22%3B; 1031b8c41dfff97a311a7ac99863bdc5_username=e910b225ebf1bd323b2e632b610bc5b29d0ca26665a484ee6e037738c1a43e63a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A9%3A%22homeaidoc%22%3B%7D; __stripe_mid=9e5a2844-086d-4ba9-8344-5d1358d2ed5e; CRAFT_CSRF_TOKEN=fdcfb3a08e59d1514a73ab02b732715a56eebd731d04018430f87e4ceeab268ca%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A40%3A%22gqlZV4dhqH9VxXItR7_TkDzV1mLlYWrpxt8B_amI%22%3B%7D; 6c228aef999c7557f40c51680fd797c2username=2956940bf1a165db1f4950fc46ebe6f9b80651b4s%3A64%3A%225fcd775cdc3be4989c0a2e2d0a919d386291f6abczo5OiJob21lYWlkb2MiOw%3D%3D%22%3B; CraftSessionId=9mhet7l9ps64j7c7jtmvvr75qc; __stripe_sid=71a94e68-68bd-4676-8023-6291dc3f0532; 6c228aef999c7557f40c51680fd797c2=7d06e757b13921230209a5bd10fdc29eb1cae5c5s%3A400%3A%22dfe5bef72d444908a70f64cb5589282e5fdd9e35YTo2OntpOjA7czo5OiJob21lYWlkb2MiO2k6MTtzOjMyOiJJTVNYUnNkdHYwUXF1R1hoRzJ%2BenE0S3AyX1FlR2NIayI7aToyO3M6MzY6ImQ1NjM3YzZmLTE5MDItNGNjMS1iYzQyLTM3YTRiNGI2MTNhMiI7aTozO2k6MDtpOjQ7czoxMjE6Ik1vemlsbGEvNS4wIChNYWNpbnRvc2g7IEludGVsIE1hYyBPUyBYIDEwXzEzXzQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS82Ni4wLjMzNTkuMTE3IFNhZmFyaS81MzcuMzYiO2k6NTthOjA6e319%22%3B',
    'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
    'SERVER_SIGNATURE' => 'Apache/2.4.29 (Ubuntu) Server at homeaidoc.test Port 80
',
    'SERVER_SOFTWARE' => 'Apache/2.4.29 (Ubuntu)',
    'SERVER_NAME' => 'homeaidoc.test',
    'SERVER_ADDR' => '192.168.33.10',
    'SERVER_PORT' => '80',
    'REMOTE_ADDR' => '192.168.33.1',
    'DOCUMENT_ROOT' => '/var/www/public',
    'REQUEST_SCHEME' => 'http',
    'CONTEXT_PREFIX' => '',
    'CONTEXT_DOCUMENT_ROOT' => '/var/www/public',
    'SERVER_ADMIN' => 'webmaster@localhost',
    'SCRIPT_FILENAME' => '/var/www/public/index.php',
    'REMOTE_PORT' => '58251',
    'REDIRECT_URL' => '/admin',
    'REDIRECT_QUERY_STRING' => 'p=admin',
    'GATEWAY_INTERFACE' => 'CGI/1.1',
    'SERVER_PROTOCOL' => 'HTTP/1.1',
    'REQUEST_METHOD' => 'GET',
    'QUERY_STRING' => 'p=admin',
    'REQUEST_URI' => '/admin',
    'SCRIPT_NAME' => '/index.php',
    'PHP_SELF' => '/index.php',
    'REQUEST_TIME_FLOAT' => 1524428606.937,
    'REQUEST_TIME' => 1524428606,
]

**Tags:** craft3

> **Comments:**
> **username_1**: Seems like there is an error in your `db.php` config. Could you share your configuration?  
> **username_0**: This exactly what happened. Thank you for your help! This is the line that I added:    'initSQLs' => array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';")  I was updating my sever environment and needed this for Craft 2.6 to work with MySQL 5.5 and higher. It was a work around that the Pixel & Tonic team provided awhile back.  

---

## 1 answers

### Answer by username_0 on 2018-04-23. Score: 1

This exactly what happened. Thank you for your help! This is the line that I added: 
'initSQLs' => array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';") 

I was updating my sever environment and needed this for Craft 2.6 to work with MySQL 5.5 and higher. It was a work around that the Pixel & Tonic team provided awhile back. Thanks for pointing me in the right direction.


---

