Switching to remi breaks mvc/yii app on a Centos7 server
I switched over to remi 5.6 from Centos php 5.4 on a centos7 server. Everything worked perfectly before the change over so it would not seem to make sense that there is a code error. I got everything working but an mvc/yii app which is having trouble.
I believe I fixed this once on another server simply by adding a missing package. However, which, I cannot recall at this point.
If memory serves, it was related to the php-mysql package which I replaced with php-mysqlnd since the php-mysql package is deprecated with 5.6.
PDOException: 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 thePDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. (uncaught exception) at /var/www/vhosts/myapp/client_php/src/Service/ClientService.php line 51 {"exception":"[object]PDOException(code: HY000): 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. at/var/www/vhosts/myapp/client_php/src/Service/ClientService.php:51)"} []
I've held back going to remi to get 5.6 for a long time but now need to because of the security changes in 5.6 so going back isn't really an option otherwise would never have even bothered with this :).
Also, I fixed this before so what ever the issue was, it wasn't all that big but I don't seem to have kept notes on what it was or how to fix it.
I'm not sure what you mean by this is well known. What is? That REMI breaks stuff or that 'what ever you're telling me the error is known as' is well documented somewhere? How well known could it be, I've been trying to find out more about it for hours but mainly am finding programming posts.
This 'PDO::MYSQL_ATTR_USE_BUFFERED_QUERY' suggests programming but I fixed this without any programming changes before.
BTW, the mvc/yii app is using composer which I suspect is where the problem is related to if memory serves. Last time, I seem to recall having to rebuild the modules or re-install or configure them, something along those lines.
Also, I fixed this before so what ever the issue was, it wasn't all that big but I don't seem to have kept notes on what it was or how to fix it.
I'm not sure what you mean by this is well known. What is? That REMI breaks stuff or that 'what ever you're telling me the error is known as' is well documented somewhere? How well known could it be, I've been trying to find out more about it for hours but mainly am finding programming posts.
This 'PDO::MYSQL_ATTR_USE_BUFFE
BTW, the mvc/yii app is using composer which I suspect is where the problem is related to if memory serves. Last time, I seem to recall having to rebuild the modules or re-install or configure them, something along those lines.
php composer.phar install --prefer-dist -o --no-dev
This won't run because it cannot find composer.phar