2

我在我的服务器(但不是本地)上收到 Pimcore 异常:

$entries = new Object\CarouselImage\Listing();

Stacktrace 的异常是:

Fatal error: Uncaught exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : 
Prepared statement needs to be re-prepared' in /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Zend/Db/Statement/Mysqli.php:214 
Stack trace: 
#0 /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array) 
#1 /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) 
#2 /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Zend/Db/Adapter/Abstract.php(737): Zend_Db_Adapter_Abstract->query('SELECT object_6...', Array) 
#3 [internal function]: Zend_Db_Adapter_Abstract->fetchAll('SELECT object_6...', Array) 
#4 /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Pimcore/Resource/Wrapper.php(263): call_user_func_array(Array, Array) 
#5 /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Pimcore/Resource/Wrapper.php(233): Pimcore\Resource\Wrapper->callResourceMethod('fetchAll', Array) 
#6 /www/doc/www.eastmeetswest.eu/www/pimcore/ in /www/doc/www.eastmeetswest.eu/www/pimcore/lib/Zend/Db/Statement/Mysqli.php on line 214

完全相同的代码在 localhost 上执行它应该执行的所有操作,如果我使用以下命令遍历对象:

$entry = Object_CarouselImage::getById($id);

一切正常。

4

1 回答 1

3

可能最简单的解决方案是切换到 Pdo_Mysql。在数据库节点下的 /website/var/config/system.xml 中更改此行

<adapter>Pdo_Mysql</adapter>

这可能会导致一些其他问题,但请在切换后彻底测试。

于 2015-11-13T16:09:07.007 回答