cancel
Showing results for 
Search instead for 
Did you mean: 

Product page display Home page after moved to new server

Product page display Home page after moved to new server

I've successfully move M1.9.2.4 to new server. Just move files and db. The only change was the domain. All pages work ok, but product page view display home page. The only error I have, is from system.log.

Warning: addcslashes() expects parameter 1 to be string, object given  in /.../lib/Zend/Db/Adapter/Pdo/Abstract.php on line 296

 

And I can't add any product to cart. 

Cache was flushed and clean, and Index was reindexed too.

 

Any help?

Many thanks!!!

3 REPLIES 3

Re: Product page display Home page after moved to new server

Hi @planetadeleste 

 

I will recommend you to update/downgrade your new server PHP version. You need to check for the M1.9.2.4 compatible version. Also you can disable notice and warning in your Magento by setting your magento in production environment.

 

I hope it will help you.

 

Thanks
--
If my answer is useful, please Accept as Solution & give Kudos

Re: Product page display Home page after moved to new server

Thanks @PankajS_Magento for your response

 

PHP version is 5.6 like the old server.

I found this error in exception.log.

 

 

2019-05-07T14:19:09+00:00 ERR (3): 
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('cpses_m1czoo3nqu'@'localhost') does not exist' in /.../lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /.../lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /.../lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /.../app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /.../lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /.../lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `re...', Array)
#5 /.../lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `re...', Array)
#6 /.../lib/Zend/Db/Adapter/Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `re...', Array)
#7 /.../app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(453): Zend_Db_Adapter_Abstract->insert('report_event', Array)
#8 /.../app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Reports_Model_Event))
#9 /.../app/code/core/Mage/Reports/Model/Event/Observer.php(79): Mage_Core_Model_Abstract->save()
#10 /.../app/code/core/Mage/Reports/Model/Event/Observer.php(150): Mage_Reports_Model_Event_Observer->_event(1, '934')
#11 /.../app/code/core/Mage/Core/Model/App.php(1358): Mage_Reports_Model_Event_Observer->catalogProductView(Object(Varien_Event_Observer))
#12 /.../app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Reports_Model_Event_Observer), 'catalogProductV...', Object(Varien_Event_Observer))
#13 /.../app/Mage.php(451): Mage_Core_Model_App->dispatchEvent('catalog_control...', Array)
#14 /.../app/code/core/Mage/Catalog/Helper/Product/View.php(135): Mage::dispatchEvent('catalog_control...', Array)
#15 /.../app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(934, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#16 /.../app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#17 /.../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#18 /.../app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /.../app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#20 /.../app/Mage.php(687): Mage_Core_Model_App->run(Array)
#21 /.../index.php(83): Mage::run('', 'store')
#22 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('cpses_m1czoo3nqu'@'localhost') does not exist, query was: INSERT INTO `report_event` (`logged_at`, `event_type_id`, `object_id`, `subtype`, `store_id`) VALUES ('2019-05-07 14:19:09', \?, \?, \?, \?)' in /.../lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /.../lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /.../app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /.../lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /.../lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `re...', Array)
#4 /.../lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `re...', Array)
#5 /.../lib/Zend/Db/Adapter/Abstract.php(576): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `re...', Array)
#6 /.../app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(453): Zend_Db_Adapter_Abstract->insert('report_event', Array)
#7 /.../app/code/core/Mage/Core/Model/Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Reports_Model_Event))
#8 /.../app/code/core/Mage/Reports/Model/Event/Observer.php(79): Mage_Core_Model_Abstract->save()
#9 /.../app/code/core/Mage/Reports/Model/Event/Observer.php(150): Mage_Reports_Model_Event_Observer->_event(1, '934')
#10 /.../app/code/core/Mage/Core/Model/App.php(1358): Mage_Reports_Model_Event_Observer->catalogProductView(Object(Varien_Event_Observer))
#11 /.../app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Reports_Model_Event_Observer), 'catalogProductV...', Object(Varien_Event_Observer))
#12 /.../app/Mage.php(451): Mage_Core_Model_App->dispatchEvent('catalog_control...', Array)
#13 /.../app/code/core/Mage/Catalog/Helper/Product/View.php(135): Mage::dispatchEvent('catalog_control...', Array)
#14 /.../app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(934, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#15 /.../app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#16 /.../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#17 /.../app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /.../app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#19 /.../app/Mage.php(687): Mage_Core_Model_App->run(Array)
#20 /.../index.php(83): Mage::run('', 'store')
#21 {main}

I don't know why use the db user cpses_m1czoo3nqu , this user isn't in any setting file. 

 

Re: Product page display Home page after moved to new server

Hello @planetadeleste 

 

it will happen when you some table exit with user identifier.

 

seems like you move server from one place to another place, and db user is diff.

 

so that thing happen.

 

so when import db you need to remove identifier

"cat old_db.sql | sed -e ""s/DEFINER=[^*]*\*/\*/"" > new_db_nodefiner.sql 

if you don't want to import again then create same user

GRANT ALL ON *.* TO 'cpses_m1czoo3nqu'@'%' IDENTIFIED BY 'complex-password';FLUSH PRIVILEGES; // where some user means your user name 

hope it will work for you.

if works then mark as solution

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer