I'm trying to migrate two table from extension created by me. I've created it on XAMPP and my migration worked fine there ( tested it few times ). Then I decided to test it on another server and what I get as an error is:
Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [1045] Access denied for user 'ivailo'#'localhost' (using password: YES)'
in Z:\extension\slide\vendor\yiisoft\yii2\db\Connection.php:624
Stack trace:
#0 Z:\extension\slide\vendor\yiisoft\yii2\db\Connection.php(996): yii\db\Connection->open()
#1 Z:\extension\slide\vendor\yiisoft\yii2\db\Connection.php(983): yii\db\Connection->getMasterPdo()
#2 Z:\extension\slide\vendor\yiisoft\yii2\db\Command.php(253): yii\db\Connection->getSlavePdo()
#3 Z:\extension\slide\vendor\yiisoft\yii2\db\Command.php(1143): yii\db\Command->prepare(true)
#4 Z:\extension\slide\vendor\yiisoft\yii2\db\Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#5 Z:\extension\slide\vendor\yiisoft\yii2\db\mysql\Schema.php(312): yii\db\Command->queryAll()
#6 Z:\extension\slide\vendor\yiisoft\yii2\db\mysql\Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#7 Z:\extension\slide\vendor\yiisoft\yii2\db\Schema.php(744): yii\db\mysql\Schema->loadTableSchema('migration')
#8 Z:\extension\slide\vendor\yiisoft\yii2\db\Schema.php(194): yii\db\Schema->getTableMetadata('{{%migration}}', 'schema', true)
#9 Z:\extension\slide\vendor\yiisoft\yii2\console\controllers\MigrateController.php(210): yii\db\Schema->getTableSchema('{{%migration}}
', true)
#10 Z:\extension\slide\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(875): yii\console\controllers\MigrateControlle
r->getMigrationHistory(NULL)
#11 Z:\extension\slide\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(166): yii\console\controllers\BaseMigrateContr
oller->getNewMigrations()
#12 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#13 Z:\extension\slide\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array)
#14 Z:\extension\slide\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#15 Z:\extension\slide\vendor\yiisoft\yii2\console\Controller.php(148): yii\base\Controller->runAction('up', Array)
#16 Z:\extension\slide\vendor\yiisoft\yii2\base\Module.php(528): yii\console\Controller->runAction('up', Array)
#17 Z:\extension\slide\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction('migrate/up', Array)
#18 Z:\extension\slide\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction('migrate/up', Array)
#19 Z:\extension\slide\vendor\yiisoft\yii2\base\Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request
))
#20 Z:\extension\slide\yii(23): yii\base\Application->run()
#21 {main}
My Yii2 is fresh installed one. Only added the extension via composer. Database configuration is correct ( user and password that we are using for years ). I've created test table and executed one line Yii::$app->db->createCommand('INSERT INTO test VALUES (1,'testname')') and that passed fine. That way I decide that the connection is ok. But with console migration php yii migrate/up --migrationPath=#vendor/********/*******/migrations it gave me the error above. Want to mention that I am not familiar with our server configurations ( All I know is OS: Ubuntu 14.04 H: Apache2 ) and system administrating at all if the problem is about that somehow. Thank you in advance!
Related
I'm sorry for my English.
Good day, developers,
I need your help, I have an app that I must migrate https://creamedicinaprepagada.com/ It is developed in Laravel + VueJS, at the moment it is hosted in AWS CPANEL, but I must migrate to CPANEL HOSTINGER. I am passing all the files and databases from the AWS CPANEL to CPANEL HOSTINGER, the app i did not develop it and those are the only files I have.
In the first image you can see the public html and in the second what the AppGestorContenido folder contains.
It gives me error 500.
Stack trace:
#0 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(785): Illuminate\Events\EventServiceProvider->Illuminate\Events\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build(Object(Closure))
#2 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(615): Illuminate\Container\Container->resolve('events', Array)
#3 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(767): Illuminate\Container\Container->make('events', Array)
#4 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(1227): Illuminate\Foundation\Application->make('events')
#5 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php(40): Illuminate\Container\Container->offsetGet('events')
#6 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(785): Illuminate\Routing\RoutingServiceProvider->Illuminate\Routing\{closure}(Object(Illuminate\Foundation\Application), Array)
#7 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build(Object(Closure))
#8 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(615): Illuminate\Container\Container->resolve('router', Array)
#9 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(767): Illuminate\Container\Container->make('router', Array)
#10 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(927): Illuminate\Foundation\Application->make('router')
#11 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(855): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter))
#12 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(816): Illuminate\Container\Container->resolveDependencies(Array)
#13 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build('App\\Http\\Kernel')
#14 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(265): Illuminate\Container\Container->resolve('App\\Http\\Kernel', Array, false)
#15 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(785): Illuminate\Container\Container->Illuminate\Container\{closure}(Object(Illuminate\Foundation\Application), Array)
#16 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build(Object(Closure))
#17 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(615): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array)
#18 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(767): Illuminate\Container\Container->make('Illuminate\\Cont...', Array)
#19 /home/tucachivache/public_html/index.php(55): Illuminate\Foundation\Application->make('Illuminate\\Cont...')
#20 {main}
thrown in /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php on line 18
[17-Feb-2021 21:54:27 UTC] PHP Warning: include(/home/tucachivache/public_html/AppGestorContenido/vendor/composer/../laravel/framework/src/Illuminate/Events/Dispatcher.php): failed to open stream: No such file or directory in /home/tucachivache/public_html/AppGestorContenido/vendor/composer/ClassLoader.php on line 444
[17-Feb-2021 21:54:27 UTC] PHP Warning: include(): Failed opening '/home/tucachivache/public_html/AppGestorContenido/vendor/composer/../laravel/framework/src/Illuminate/Events/Dispatcher.php' for inclusion (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/tucachivache/public_html/AppGestorContenido/vendor/composer/ClassLoader.php on line 444
[17-Feb-2021 21:54:27 UTC] PHP Fatal error: Uncaught Error: Class 'Illuminate\Events\Dispatcher' not found in /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php:18
Stack trace:
#0 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(785): Illuminate\Events\EventServiceProvider->Illuminate\Events\{closure}(Object(Illuminate\Foundation\Application), Array)
#1 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build(Object(Closure))
#2 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Container/Container.php(615): Illuminate\Container\Container->resolve('events', Array)
#3 /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(767): Illuminate\Container\Container->make('events', Array)
#4 /home/tucachivache/public_html/AppGest in /home/tucachivache/public_html/AppGestorContenido/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php on line 18
seems like you are missing the vendor folder from laravel
rm -rf ./vendor
composer install
php artisan migrate
my bee this worked
I have a CakePHP project running on other server PHP 5.6 but here this same app is not running on PHP 5.6 / 7.0.
I am using Croogo with CakePHP.
It's showing me debug error like below:
Error: [Error] Unsupported operand types
Stack Trace:
#0 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(282): include()
#1 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(201): CakePlugin::_includeFile('/var/www/vhosts...', true)
#2 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(121): CakePlugin::bootstrap('Acl')
#3 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(94): CakePlugin::load('Acl', Array)
#4 /Vendor/croogo/croogo/Extensions/Lib/CroogoPlugin.php(656): CakePlugin::load(Array, Array)
#5 /Vendor/croogo/croogo/Croogo/Config/croogo_bootstrap.php(126): CroogoPlugin::load(Array)
#6 /Vendor/croogo/croogo/Croogo/Config/bootstrap.php(8): require_once('/var/www/vhosts...')
#7 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(282): include('/var/www/vhosts...')
#8 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(201): CakePlugin::_includeFile('/var/www/vhosts...', false)
#9 /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(121): CakePlugin::bootstrap('Croogo')
#10 /Config/bootstrap.php(78): CakePlugin::load('Croogo', Array)
#11 /Vendor/cakephp/cakephp/lib/Cake/Core/Configure.php(98): include('/var/www/vhosts...')
#12 /Vendor/cakephp/cakephp/lib/Cake/bootstrap.php(432): Configure::bootstrap(true)
#13 /webroot/index.php(90): include('/var/www/vhosts...')
#14 {main}
It is from my tmp/logs/error.log file
Is there any fix?
Thanks in advance
Try debugging this place: /Vendor/cakephp/cakephp/lib/Cake/Core/CakePlugin.php(282): include() #1. See which file it's trying to include when failing and what's in it.
I have updated version of Magento EE 12.2 to Magento 14.2.0.2 but i get error when update or create product and category. Error massage is "Can't perform operation, incomplete metadata!"
I have also tried 'Enterprise_Index_Model_Action_Exception' with message 'Can't perform operation, incomplete metadata!' but not work for me.
Here is screenshot of error.
2016-06-20T12:36:57+00:00 ERR (3):
exception 'Enterprise_Index_Model_Action_Exception' with message 'Can't perform operation, incomplete metadata!' in app\code\core\Enterprise\Index\Model\Action\Abstract.php:125
Stack trace:
#0 app\code\core\Enterprise\CatalogInventory\Model\Index\Action\Refresh\Row.php(69): Enterprise_Index_Model_Action_Abstract->_validate()
#1 app\code\core\Enterprise\Mview\Model\Client.php(123): Enterprise_CatalogInventory_Model_Index_Action_Refresh_Row->execute()
#2 app\code\core\Enterprise\CatalogInventory\Model\Index\Observer.php(53): Enterprise_Mview_Model_Client->execute('enterprise_cata...', Array)
#3 app\code\core\Mage\Core\Model\App.php(1358): Enterprise_CatalogInventory_Model_Index_Observer->processStockItemSaveEvent(Object(Varien_Event_Observer))
#4 app\code\core\Mage\Core\Model\App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Enterprise_CatalogInventory_Model_Index_Observer), 'processStockIte...', Object(Varien_Event_Observer))
#5 app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('cataloginventor...', Array)
#6 app\code\core\Mage\Core\Model\Abstract.php(344): Mage::dispatchEvent('cataloginventor...', Array)
#7 app\code\core\Mage\CatalogInventory\Model\Stock\Item.php(893): Mage_Core_Model_Abstract->afterCommitCallback()
#8 [internal function]: Mage_CatalogInventory_Model_Stock_Item->afterCommitCallback()
#9 app\code\core\Mage\Core\Model\Resource\Abstract.php(110): call_user_func(Array)
#10 app\code\core\Mage\Core\Model\Abstract.php(322): Mage_Core_Model_Resource_Abstract->commit()
#11 app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php(728): Mage_Core_Model_Abstract->save()
#12 app\code\core\Mage\Core\Controller\Varien\Action.php(418): Mage_Adminhtml_Catalog_ProductController->saveAction()
#13 app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#14 app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 app\code\core\Mage\Core\Model\App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#16 app\Mage.php(684): Mage_Core_Model_App->run(Array)
#17 index.php(83): Mage::run('', 'store')
#18 {main}
Try to use php 5.3 disabling warnings and notices. It avoids some code warnings deprecation in old version.
If you get some invalid function name in the middle, go upgrading to 5.4, 5.5, etc.
It usually works for me. ;)
I have installed extension from magento connect from website and logged out but when I tried to access admin panel but now I am getting error.
"There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 1303816771146"
when i traced error file under var/report i found following error report.
"a:5:{i:0;s:71:"Mage registry key "_singleton/emailattachments/observer" already exists";i:1;s:2604:"
#0 /home/globaltrimming12/public_html/app/Mage.php(223): Mage::throwException('Mage registry k...')
#1 /home/globaltrimming12/public_html/app/Mage.php(477): Mage::register('_singleton/emai...', false)
#2 /home/globaltrimming12/public_html/includes/src/__default.php(21770): Mage::getSingleton('emailattachment...')
#3 /home/globaltrimming12/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('core_block_abst...', Array)
#4 /home/globaltrimming12/public_html/includes/src/__default.php(1988): Mage::dispatchEvent('core_block_abst...', Array)
#5 /home/globaltrimming12/public_html/includes/src/__default.php(28179): Mage_Core_Block_Abstract->setLayout(Object(Codnitive_Extifcon_Model_Core_Layout))
#6 /home/globaltrimming12/public_html/includes/src/__default.php(28195): Mage_Core_Model_Layout->createBlock('adminhtml/page_...', 'head')
#7 /home/globaltrimming12/public_html/includes/src/__default.php(27962): Mage_Core_Model_Layout->addBlock('adminhtml/page_...', 'head')
#8 /home/globaltrimming12/public_html/includes/src/__default.php(27928): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#9 /home/globaltrimming12/public_html/includes/src/__default.php(27929): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#10 /home/globaltrimming12/public_html/includes/src/__default.php(14024): Mage_Core_Model_Layout->generateBlocks()
#11 /home/globaltrimming12/public_html/includes/src/__default.php(13949): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#12 /home/globaltrimming12/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#13 /home/globaltrimming12/public_html/app/code/core/Mage/Adminhtml/controllers/IndexController.php(81): Mage_Adminhtml_Controller_Action->loadLayout()
#14 /home/globaltrimming12/public_html/includes/src/__default.php(14098): Mage_Adminhtml_IndexController->loginAction()
#15 /home/globaltrimming12/public_html/includes/src/__default.php(18482): Mage_Core_Controller_Varien_Action->dispatch('login')
#16 /home/globaltrimming12/public_html/includes/src/__default.php(18016): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /home/globaltrimming12/public_html/includes/src/__default.php(20808): Mage_Core_Controller_Varien_Front->dispatch()
#18 /home/globaltrimming12/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /home/globaltrimming12/public_html/index.php(87): Mage::run('', 'store')
#20 {main}";s:3:"url";s:7:"/admin/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}"
please let me know where to do changes so I can be able to login to admin panel.
Seems like, your magento compilation is on. Always turn compilation off before installing an extension, and of course disable cache. Find more info on compilation here.
I update from Magento 1.6.2 to 1.8.1 and now I get this on my page:
Warning: session_module_name(): Cannot find named PHP session module (memcache) in /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 73
#0 [internal function]: mageCoreErrorHandler(2, 'session_module_...', '/var/www/vhosts...', 73, Array)
#1 /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(73): session_module_name('memcache')
#2 /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(168): Mage_Core_Model_Session_Abstract_Varien->start('adminhtml')
#3 /app/code/core/Mage/Core/Model/Session/Abstract.php(84): Mage_Core_Model_Session_Abstract_Varien->init('core', 'adminhtml')
#4 /app/code/core/Mage/Core/Model/Session.php(42): Mage_Core_Model_Session_Abstract->init('core', 'adminhtml')
#5 /app/code/core/Mage/Core/Model/Config.php(1353): Mage_Core_Model_Session->__construct(Array)
#6 /app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/session', Array)
#7 /app/Mage.php(477): Mage::getModel('core/session', Array)
#8 /app/code/core/Mage/Core/Controller/Varien/Action.php(493): Mage::getSingleton('core/session', Array)
#9 /app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#10 /app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#11 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /app/code/local/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#14 /app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 index.php(87): Mage::run('', 'store')
#16 {main}
I have checked everything I could find on the net, but can't seem to solve this one?
I don't know what session module it is looking for? PHP? memcache?
I have been locked out for 3 days now!!!
It looks like your app/etc/local.xml file is configured to use the PHP memcache session storage handler. When Magento reads this configuration value in and tries to set the session handler with the session_module_name function it finds the version of PHP you're using doesn't have the memcache session hander installed and/or enabled.
You'll need to disable this configuration value in your app/etc/local.xml file and use the standard file/database session storage method, or you'll need to install/enable the session handler on the server you've installed Magento on.