列出对象时出现 Pimcore 异常

Pimcore exception when listing objects

我在我的服务器上(但不是本地的)在以下行收到 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

完全相同的代码完成了它应该在本地主机上完成的所有事情,如果我用以下方法遍历对象:

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

一切正常。

可能最简单的解决方案是切换到 Pdo_Mysql。 在 /website/var/config/system.xml 中更改此行 database node

<adapter>Pdo_Mysql</adapter>

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