We help IT Professionals succeed at work.
Get Started

Switching to remi breaks mvc/yii app on a Centos7 server

projects
projects asked
on
184 Views
Last Modified: 2016-07-31
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

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 2 Answers and 9 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE