Estou com um problema no Zend Framework e não sei como resolver.
Numa de minhas páginas recebo a seguinte mensagem de erro:
Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.' in /var/www/html/phpweb20/include/Zend/Db/Statement/Pdo.php:68 Stack trace: #0 /var/www/html/phpweb20/include/Zend/Db/Statement.php(109): Zend_Db_Statement_Pdo->_prepare('select profile_...') #1 /var/www/html/phpweb20/include/Zend/Db/Adapter/Pdo/Abstract.php(156): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Pdo_Mysql), 'select profile_...') #2 /var/www/html/phpweb20/include/Zend/Db/Adapter/Abstract.php(382): Zend_Db_Adapter_Pdo_Abstract->prepare('select profile_...') #3 /var/www/html/phpweb20/include/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query('select profile_...', Array) #4 /var/www/html/phpweb20/include/Pro in /var/www/html/phpweb20/include/Zend/Db/Statement/Pdo.php on line 68
Pelo que eu entendi, tenho que trocar a opção
- Código: Selecionar tudo
PDOStatement::fetchAll()
por
- Código: Selecionar tudo
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
só tem um problema, eu não sei como.
Já tentei achar essa opção no arquivo /var/www/html/phpweb20/include/Zend/Db/Statement/Pdo.php e no /var/www/html/phpweb20/include/Zend/Db/Statement.php mas não encontrei.
Se alguma alma bondosa puder me ajudar, eu ficaria feliz.
Obs.: Estou usando o CentOS.



