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 the
PDO::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)"} []

Open in new window


# yum list installed | grep "remi"
gd-last.x86_64                        2.2.3-1.el7.remi               @remi
libzip-last.x86_64                    1.1.3-1.el7.remi               @remi
memcached.x86_64                      1.4.29-1.el7.remi              @remi
php.x86_64                            5.6.24-1.el7.remi              @remi-php56
php-bcmath.x86_64                     5.6.24-1.el7.remi              @remi-php56
php-cli.x86_64                        5.6.24-1.el7.remi              @remi-php56
php-common.x86_64                     5.6.24-1.el7.remi              @remi-php56
php-devel.x86_64                      5.6.24-1.el7.remi              @remi-php56
php-gd.x86_64                         5.6.24-1.el7.remi              @remi-php56
php-gmp.x86_64                        5.6.24-1.el7.remi              @remi-php56
php-intl.x86_64                       5.6.24-1.el7.remi              @remi-php56
php-mbstring.x86_64                   5.6.24-1.el7.remi              @remi-php56
php-mysqlnd.x86_64                    5.6.24-1.el7.remi              @remi-php56
php-opcache.x86_64                    5.6.24-1.el7.remi              @remi-php56
php-pdo.x86_64                        5.6.24-1.el7.remi              @remi-php56
php-pear.noarch                       1:1.10.1-5.el7.remi            @remi
php-pecl-apcu.x86_64                  4.0.11-2.el7.remi.5.6          @remi-php56
php-pecl-jsonc.x86_64                 1.3.10-1.el7.remi.5.6          @remi-php56
php-pecl-jsonc-devel.x86_64           1.3.10-1.el7.remi.5.6          @remi-php56
php-pecl-memcache.x86_64              3.0.8-4.el7.remi.5.6           @remi-php56
php-pecl-zip.x86_64                   1.13.4-1.el7.remi.5.6          @remi-php56
php-php-gettext.noarch                1.0.11-12.el7.remi             @remi
php-phpseclib.noarch                  2.0.2-1.el7.remi               @remi
php-process.x86_64                    5.6.24-1.el7.remi              @remi-php56
php-recode.x86_64                     5.6.24-1.el7.remi              @remi-php56
php-symfony-class-loader.noarch       2.8.8-1.el7.remi               @remi
php-symfony-common.noarch             2.8.8-1.el7.remi               @remi
php-tcpdf.noarch                      6.2.12-1.el7.remi              @remi
php-tcpdf-dejavu-sans-fonts.noarch    6.2.12-1.el7.remi              @remi
php-tidy.x86_64                       5.6.24-1.el7.remi              @remi-php56
php-xml.x86_64                        5.6.24-1.el7.remi              @remi-php56
remi-release.noarch                   7.2-1.el7.remi                 @remi

Open in new window

projectsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gheistCommented:
REMI is known to break stuff. That is well documented on REMI and CentOS websites.
The fix is to revert back to working CentOS PHP and experiment with SCL PHP
1
projectsAuthor Commented:
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.

 php composer.phar install --prefer-dist -o --no-dev

This won't run because it cannot find composer.phar
0
projectsAuthor Commented:
I gave up and went back to Centos 5.4. It's not worth the headaches. I'll build another server to test this in the near future.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

gheistCommented:
Good luck...
Start with migrating to php-fpm, that way the replacement can be tested on same machine.
0
projectsAuthor Commented:
What ever the reasons are, I don't have time to look for them on a live server. This will have to be done on a dev server.
0
gheistCommented:
Should not take more than 5 minutes to configure desktop virtual machine with 1GB RAM ;)
0
projectsAuthor Commented:
I have pre-made templates so even less :)
0
gheistCommented:
Take your time, make a new template.
You can have different FPM-s with different PHP versions on your server. https://www.softwarecollections.org/en/scls/?search=php
0
projectsAuthor Commented:
Yes, we did that at one point but it was too complicated to maintain when there are multiple admins.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.