Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created + cakephp 2.x - mysql

I got an error during placing order. Order placed half and after that i got error. I checked error.log file i found,
013-11-25 16:35:07 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
#0 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Datasource/DboSource.php(261): Mysql->connect()
#1 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/ConnectionManager.php(101): DboSource->__construct(Array)
#2 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(3164): ConnectionManager::getDataSource('default')
#3 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(1096): Model->setDataSource('default')
#4 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(3186): Model->setSource('baskets')
#5 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Model/Model.php(2637): Model->getDataSource()
#6 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/Model/Basket.php(24): Model->find('first', Array)
#7 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/Controller/AppController.php(53): Basket->getSessionDetails('c71b56ada66fd45...')
#8 [internal function]: AppController->beforeFilter(Object(CakeEvent))
#9 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Event/CakeEventManager.php(246): call_user_func(Array, Object(CakeEvent))
#10 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Controller/Controller.php(669): CakeEventManager->dispatch(Object(CakeEvent))
#11 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Routing/Dispatcher.php(183): Controller->startupProcess()
#12 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/lib/Cake/Routing/Dispatcher.php(161): Dispatcher->_invoke(Object(IndexController), Object(CakeRequest), Object(CakeResponse))
#13 /usr/local/pem/vhosts/262731/webspace/httpdocs/parceldirect.ie/app/webroot/index.php(92): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#14 {main}
Can anyone suggest me what is the issue with connection? Was server down during order process and got that error? Or any other issue?

Related

MediaWiki TemplateParser.php internal error

I have a local wiki (MediaWiki 1.38.4 ; Apache with xampp) that worked perfectly for a few weeks, but today started giving me errors with the TemplateParser.php and now is completely unnaccesible and shows the following error details:
MediaWiki internal error.
Original exception: [3d60e113338e8a53946d26be] /fangirlbook/index.php/P%C3%A1gina_principal TypeError: Cannot access offset of type string on string
Backtrace:
from C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(134)
#0 C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(289): TemplateParser->getTemplate(string)
#1 C:\xampp\htdocs\fangirlbook\includes\skins\SkinMustache.php(65): TemplateParser->processTemplate(string, array)
#2 C:\xampp\htdocs\fangirlbook\skins\Vector\includes\SkinVector.php(455): SkinMustache->generateHTML()
#3 C:\xampp\htdocs\fangirlbook\includes\skins\SkinTemplate.php(150): Vector\SkinVector->generateHTML()
#4 C:\xampp\htdocs\fangirlbook\includes\OutputPage.php(2807): SkinTemplate->outputPage()
#5 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(926): OutputPage->output(boolean)
#6 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(939): MediaWiki::{closure}()
#7 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(563): MediaWiki->main()
#8 C:\xampp\htdocs\fangirlbook\index.php(53): MediaWiki->run()
#9 C:\xampp\htdocs\fangirlbook\index.php(46): wfIndexMain()
#10 {main}
Exception caught inside exception handler: [3d60e113338e8a53946d26be] /fangirlbook/index.php/P%C3%A1gina_principal TypeError: Cannot access offset of type string on string
Backtrace:
from C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(134)
#0 C:\xampp\htdocs\fangirlbook\includes\TemplateParser.php(289): TemplateParser->getTemplate(string)
#1 C:\xampp\htdocs\fangirlbook\includes\skins\SkinMustache.php(65): TemplateParser->processTemplate(string, array)
#2 C:\xampp\htdocs\fangirlbook\skins\Vector\includes\SkinVector.php(455): SkinMustache->generateHTML()
#3 C:\xampp\htdocs\fangirlbook\includes\skins\SkinTemplate.php(150): Vector\SkinVector->generateHTML()
#4 C:\xampp\htdocs\fangirlbook\includes\OutputPage.php(2807): SkinTemplate->outputPage()
#5 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionRenderer.php(157): OutputPage->output()
#6 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionRenderer.php(76): MWExceptionRenderer::reportHTML(TypeError)
#7 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionHandler.php(107): MWExceptionRenderer::output(TypeError, integer)
#8 C:\xampp\htdocs\fangirlbook\includes\exception\MWExceptionHandler.php(202): MWExceptionHandler::report(TypeError)
#9 C:\xampp\htdocs\fangirlbook\includes\MediaWiki.php(585): MWExceptionHandler::handleException(TypeError, string)
#10 C:\xampp\htdocs\fangirlbook\index.php(53): MediaWiki->run()
#11 C:\xampp\htdocs\fangirlbook\index.php(46): wfIndexMain()
#12 {main}
I have already restarted the system, re-installed the wiki and copying the manual backup I had of the files and the database, and no solution. Any ideas?

Error occur after composer require

I ran composer require 2amigos/yii2-multi-select-widget "*" and after my site went down
An Error occurred while handling another error:
yii\base\InvalidArgumentException: Invalid path alias: #dektrium/rbac/views in C:\xampp\htdocs\webster\vendor\yiisoft\yii2\BaseYii.php:154
Stack trace:
#0 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Theme.php(144): yii\BaseYii::getAlias('#dektrium/rbac/...')
#1 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(228): yii\base\Theme->applyTo('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\ErrorHandler.php(266): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(yii\web\ErrorHandler))
#3 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\ErrorHandler.php(126): yii\web\ErrorHandler->renderFile('#yii/views/erro...', Array)
#4 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(yii\base\InvalidArgumentException))
#5 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\base\InvalidArgumentException))
#6 {main}
Previous exception:
yii\base\InvalidArgumentException: Invalid path alias: #dektrium/rbac/views in C:\xampp\htdocs\webster\vendor\yiisoft\yii2\BaseYii.php:154
Stack trace:
#0 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Theme.php(144): yii\BaseYii::getAlias('#dektrium/rbac/...')
#1 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(228): yii\base\Theme->applyTo('C:\\xampp\\htdocs...')
#2 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\View.php(156): yii\base\View->renderFile('C:\\xampp\\htdocs...', Array, Object(backend\controllers\SiteController))
#3 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Controller.php(384): yii\base\View->render('index', Array, Object(backend\controllers\SiteController))
#4 C:\xampp\htdocs\webster\backend\controllers\SiteController.php(65): yii\base\Controller->render('index')
#5 [internal function]: backend\controllers\SiteController->actionIndex()
#6 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#7 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#8 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Module.php(528): yii\base\Controller->runAction('', Array)
#9 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\web\Application.php(103): yii\base\Module->runAction('', Array)
#10 C:\xampp\htdocs\webster\vendor\yiisoft\yii2\base\Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#11 C:\xampp\htdocs\webster\backend\web\index.php(18): yii\base\Application->run()
#12 {main}
It is all that I did. Nothing more nothing less. Just tried to install multi-select and my site went down. Why is that? What can cause this? I tried to remove it composer remove 2amigos/yii2-multi-select-widget and nothing happen. I am totally shocked. Please give me advice!

Yii2 migration configException error

Suddenly any of the migration command is not working in my project and i don't know why. following is the errors in cmd.
C:\wamp64\www\project>yii migrate
Exception 'yii\base\InvalidConfigException' with message 'Failed to instantiate component or class "user".'
in C:\wamp64\www\project\vendor\yiisoft\yii2\di\Instance.php:139
Stack trace:
#0 C:\wamp64\www\project\vendor\yiisoft\yii2\filters\AccessControl.php(100): yii\di\Instance::ensure(Object(yii\di\Instance), 'yii\\web\\User')
#1 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Object.php(107): yii\filters\AccessControl->init()
#2 [internal function]: yii\base\Object->__construct(Array)
#3 C:\wamp64\www\project\vendor\yiisoft\yii2\di\Container.php(381): ReflectionClass->newInstanceArgs(Array)
#4 C:\wamp64\www\project\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\filters\\Acc...', Array, Array)
#5 C:\wamp64\www\project\vendor\yiisoft\yii2\BaseYii.php(348): yii\di\Container->get('yii\\filters\\Acc...', Array, Array)
#6 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Component.php(183): yii\BaseYii::createObject(Array)
#7 C:\wamp64\www\project\vendor\yiisoft\yii2\BaseYii.php(529): yii\base\Component->__set('beforeRequest', Array)
#8 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Object.php(105): yii\BaseYii::configure(Object(yii\console\Application), Array)
#9 C:\wamp64\www\project\vendor\yiisoft\yii2\base\Application.php(205): yii\base\Object->__construct(Array)
#10 C:\wamp64\www\project\vendor\yiisoft\yii2\console\Application.php(89): yii\base\Application->__construct(Array)
#11 C:\wamp64\www\project\yii(26): yii\console\Application->__construct(Array)
#12 {main}
Please help me to solve it.

Warning: include(Google/Client.php): failed to open stream: No such file or directory

I've been working for the last couple days at trying to get to Google Shopping to work. I keep getting this error:
Warning: include(Google/Client.php): failed to open stream: No such file or directory in /home/xxxx/public_html/lib/Varien/Autoload.php on line 56
#0 /home/xxxx/public_html/lib/Varien/Autoload.php(56): mageCoreErrorHandler(2, 'include(Google/...', '/home/xxxx/...', 56, Array)
#1 /home/xxxx/public_html/lib/Varien/Autoload.php(56): Varien_Autoload::autoload()
#2 [internal function]: Varien_Autoload->autoload('Google_Client')
#3 [internal function]: spl_autoload_call('Google_Client')
#4 /home/xxxx/public_html/vendor/google/apiclient/src/Google/Auth/AssertionCredentials.php(18): class_exists('Google_Client')
#5 /home/xxxx/public_html/vendor/google/apiclient/src/Google/autoload.php(29): require_once('/home/xxxx/...')
#6 [internal function]: Varien_Autoload->{closure}('Google_Auth_Ass...')
#7 /home/xxxx/public_html/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/GoogleShopping.php(107): spl_autoload_call('Google_Auth_Ass...')
#8 /home/xxxx/public_html/app/code/community/BlueVisionTec/GoogleShoppingApi/controllers/Adminhtml/GoogleShoppingApi/ItemsController.php(53): BlueVisionTec_GoogleShoppingApi_Model_GoogleShopping->getClient('1')
#9 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(278): BlueVisionTec_GoogleShoppingApi_Adminhtml_GoogleShoppingApi_ItemsController->indexAction()
#10 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(200): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /home/xxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(116): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/xxxx/public_html/app/code/core/Mage/Core/Model/App.php(189): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/xxxx/public_html/app/Mage.php(415): Mage_Core_Model_App->run(Array)
#14 /home/xxxx/public_html/index.php(40): Mage::run('', 'store')
#15 {main}
I've tried installing with composer and manually but nothing seems to work. Anyone knows what the problem is? Thanks
I moved the Google file to the root of my site, like Google/Client.php then in BlueVisionTec/GoogleShoppingApi/Model/GoogleShopping.php I changed the link to require_once Mage::getBaseDir().'/Google/autoload.php'; and everything worked prefect.

Magento site down due to mysql error General error: 1030 Got error -1 from storage engine

I even deleted all records from log_visitor table, still getting the same issue. Following is the stack I am getting.
SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine
#0 /home/site/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/site/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/site/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/site/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `lo...', Array)
#4 /home/site/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `lo...', Array)
#5 /home/site/public_html/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `lo...', Array)
#6 /home/site/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(453): Zend_Db_Adapter_Abstract->insert('log_visitor', Array)
#7 /home/site/public_html/app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Log_Model_Visitor))
#8 /home/site/public_html/app/code/core/Mage/Log/Model/Visitor.php(167): Mage_Core_Model_Abstract->save()
#9 /home/site/public_html/app/code/core/Mage/Core/Model/App.php(1338): Mage_Log_Model_Visitor->initByRequest(Object(Varien_Event_Observer))
#10 /home/site/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Log_Model_Visitor), 'initByRequest', Object(Varien_Event_Observer))
#11 /home/site/public_html/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#12 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(528): Mage::dispatchEvent('controller_acti...', Array)
#13 /home/site/public_html/app/code/core/Mage/Core/Controller/Front/Action.php(64): Mage_Core_Controller_Varien_Action->preDispatch()
#14 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(408): Mage_Core_Controller_Front_Action->preDispatch()
#15 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#16 /home/site/public_html/app/code/local/SM/Vendors/Controller/Router/Vendor.php(76): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /home/site/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): SM_Vendors_Controller_Router_Vendor->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/site/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/site/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#20 /home/site/public_html/index.php(87): Mage::run('', 'store')
#21 {main}
Fatal error: Exception thrown without a stack frame in Unknown on line 0
This is a live site, I need make it live as soon as possible. Please help.
This is a general error that happens when InnoDB cannot write to its data files.
I've seen reports of this when the disk is full, or if permissions on the files changed so you can't write to them.
Another report was when someone enabled innodb_force_recovery to a value greater than 0, not realizing that in recovery modes >0, InnoDB is effectively read-only.
I hope this helps.
try deleting the folders var/cache and var/session it works for me