Hi guys,
Thanks for all your support. I have another question about mysql. I went ahead and changed the password in main-custom.php as was mentioned in another thread about changing the mysql password. I just wanted to keep it all tidy and in place so that I won't get the password incorrect in future due to \'
However, it seems like mysql is now down. I am literally getting the following on my page:
CDbException
CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
/var/www/mymailwizz.comz/apps/common/components/managers/OptionsManager.php(164)
152 * @param mixed $key
153 * @return OptionsManager
154 */
155 protected function loadCategory($key)
156 {
157 list($category, $key) = $this->getCategoryAndKey($key);
158
159 if (isset($this->_categories[$category])) {
160 return $this;
161 }
162
163 // NOTE: add caching but be aware of the CLI problems when the cache does not invalidate!
164 $command = Yii::app()->db->createCommand('SELECT `category`, `key`, `value`, `is_serialized` FROM `{{option}}` WHERE `category` = :c');
165 $rows = $command->queryAll(true, array(':c' => $category));
166
167 foreach ($rows as $row) {
168 $this->_options[$row['category'].'.'.$row['key']] = !$row['is_serialized'] ? $row['value'] : unserialize($row['value']);
169 }
170
171 $this->_categories[$category] = true;
172
173 return $this;
174 }
175
176 /**
Stack Trace
#0
+ /var/www/mymailwizz.com/apps/common/framework/db/CDbConnection.php(347): CDbConnection->open()
#1
+ /var/www/mymailwizz.com/apps/common/framework/db/CDbConnection.php(325): CDbConnection->setActive(true)
#2
+ /var/www/mymailwizz.com/apps/common/framework/base/CModule.php(394): CDbConnection->init()
#3
+ /var/www/mymailwizz.com/apps/common/framework/base/CModule.php(103): CModule->getComponent("db")
#4
– /var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php(164): CModule->__get("db")
159 if (isset($this->_categories[$category])) {
160 return $this;
161 }
162
163 // NOTE: add caching but be aware of the CLI problems when the cache does not invalidate!
164 $command = Yii::app()->db->createCommand('SELECT `category`, `key`, `value`, `is_serialized` FROM `{{option}}` WHERE `category` = :c');
165 $rows = $command->queryAll(true, array(':c' => $category));
166
167 foreach ($rows as $row) {
168 $this->_options[$row['category'].'.'.$row['key']] = !$row['is_serialized'] ? $row['value'] : unserialize($row['value']);
169 }
#5
– /var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php(73): OptionsManager->loadCategory("site_status")
68 public function get($key, $defaultValue = null)
69 {
70 // simple keys are set with default category, we need to retrieve them the same.
71 $key = implode('.', $this->getCategoryAndKey($key));
72
73 $this->loadCategory($key);
74 return isset($this->_options[$key]) ? $this->_options[$key] : $defaultValue;
75 }
76
77 /**
78 * OptionsManager::isTrue()
#6
– /var/www/mymailwizz.com/apps/common/components/init/SystemInit.php(48): OptionsManager->get("system.common.site_status")
43
44 if (!MW_IS_CLI) {
45 Yii::app()->hooks->addAction($appName . '_controller_before_action', array($this, '_reindexGetArray'));
46 }
47
48 if (!in_array($appName, array('backend', 'console')) && $options->get('system.common.site_status') === 'offline') {
49 Yii::app()->hooks->addAction($appName . '_controller_before_action', array($this, '_setRedirectToOfflinePage'), -1000);
50 }
51
52 if (!MW_IS_CLI) {
53
#7
+ /var/www/mymailwizz.com/apps/common/framework/base/CComponent.php(561): SystemInit->_runOnBeginRequest(CEvent)
#8
+ /var/www/mymailwizz.com/apps/common/framework/base/CApplication.php(212): CComponent->raiseEvent("onbeginrequest", CEvent)
#9
+ /var/www/mymailwizz.com/apps/common/framework/base/CApplication.php(183): CApplication->onBeginRequest(CEvent)
#10
+ /var/www/mymailwizz.com/apps/init.php(235): CApplication->run()
#11
+ /var/www/mymailwizz.com/index.php(18): require_once("/var/www/mymailwizz.com/apps/init.php")
2018-04-17 19:16:12 Apache/2.4.18 (Ubuntu) Yii Framework/1.1.18
Application Log
Timestamp Level Category Message
19:16:12.048166 info application
$_COOKIE=array (
'mwsid' => 'mwsid',
'csrf_token' =>
'csrf_token',
)
$_SERVER=array (
'HTTP_HOST' => 'mymailwizz.com',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_CACHE_CONTROL' => 'max-age=0',
'HTTP_UPGRADE_INSECURE_REQUESTS' => '1',
'HTTP_USER_AGENT' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 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' => 'mwsid=mwsid;
csrf_token=csrf_token',
'HTTP_DNT' => '1',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'SERVER_SIGNATURE' => '<address>Apache/2.4.18 (Ubuntu) Server at
mymailwizz.com Port 80</address>
',
'SERVER_SOFTWARE' => 'Apache/2.4.18 (Ubuntu)',
'SERVER_NAME' => 'mymailwizz.com',
'SERVER_ADDR' => 'SERVER_ADDR',
'SERVER_PORT' => '80',
'REMOTE_ADDR' => 'REMOTE_ADDR',
'DOCUMENT_ROOT' => '/var/www/mymailwizz.com/',
'REQUEST_SCHEME' => 'http',
'CONTEXT_PREFIX' => '',
'CONTEXT_DOCUMENT_ROOT' => '/var/www/mymailwizz.com/',
'SERVER_ADMIN' => '
admin@mymailwizz.com',
'SCRIPT_FILENAME' => '/var/www/mymailwizz.com/index.php',
'REMOTE_PORT' => '53796',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '',
'REQUEST_URI' => '/',
'SCRIPT_NAME' => '/index.php',
'PHP_SELF' => '/index.php',
'REQUEST_TIME_FLOAT' => 1523992572.0420001,
'REQUEST_TIME' => 1523992572,
'ORIGINAL_REMOTE_ADDR' => 'ORIGINAL_REMOTE_ADDR',
)
19:16:12.053078 trace system.CModule
Loading "log" application component
in /var/www/mymailwizz.com/apps/init.php (186)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.053328 trace system.CModule
Loading "systemInit" application component
in /var/www/mymailwizz.com/apps/init.php (186)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.053397 trace system.CModule
Loading "frontendSystemInit" application component
in /var/www/mymailwizz.com/apps/init.php (186)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.053452 trace system.CModule
Loading "request" application component
in /var/www/mymailwizz.com/apps/init.php (186)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.054260 trace system.CModule
Loading "options" application component
in /var/www/mymailwizz.com/apps/common/components/init/SystemInit.php
(41)
in /var/www/mymailwizz.com/apps/init.php (235)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.054349 trace system.CModule
Loading "hooks" application component
in /var/www/mymailwizz.com/apps/common/components/init/SystemInit.php
(45)
in /var/www/mymailwizz.com/apps/init.php (235)
in /var/www/mymailwizz.com/index.php (18)
19:16:12.054439 trace system.CModule
Loading "db" application component
in
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php
(164)
in
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php
(73)
in /var/www/mymailwizz.com/apps/common/components/init/SystemInit.php
(48)
19:16:12.054521 trace system.db.CDbConnection
Opening DB connection
in
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php
(164)
in
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php
(73)
in /var/www/mymailwizz.com/apps/common/components/init/SystemInit.php
(48)
19:16:12.055217 error exception.CDbException
CDbException: CDbConnection failed to open the DB connection:
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using
password: YES) in
/var/www/mymailwizz.com/apps/common/framework/db/CDbConnection.php:399
Stack trace:
#0
/var/www/mymailwizz.com/apps/common/framework/db/CDbConnection.php(347):
CDbConnection->open()
#1
/var/www/mymailwizz.com/apps/common/framework/db/CDbConnection.php(325):
CDbConnection->setActive(true)
#2
/var/www/mymailwizz.com/apps/common/framework/base/CModule.php(394):
CDbConnection->init()
#3
/var/www/mymailwizz.com/apps/common/framework/base/CModule.php(103):
CModule->getComponent('db')
#4
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php(164):
CModule->__get('db')
#5
/var/www/mymailwizz.com/apps/common/components/managers/OptionsManager.php(73):
OptionsManager->loadCategory('site_status')
#6
/var/www/mymailwizz.com/apps/common/components/init/SystemInit.php(48):
OptionsManager->get('system.common.s...')
#7
/var/www/mymailwizz.com/apps/common/framework/base/CComponent.php(561):
SystemInit->_runOnBeginRequest(Object(CEvent))
#8
/var/www/mymailwizz.com/apps/common/framework/base/CApplication.php(212):
CComponent->raiseEvent('onbeginrequest', Object(CEvent))
#9
/var/www/mymailwizz.com/apps/common/framework/base/CApplication.php(183):
CApplication->onBeginRequest(Object(CEvent))
#10 /var/www/mymailwizz.com/apps/init.php(235): CApplication->run()
#11 /var/www/mymailwizz.com/index.php(18):
require_once('/var/www/mw1.sa...')
#12 {main}
REQUEST_URI=/
---
19:16:12.055250 trace system.CModule
Loading "errorHandler" application component