SQLSTATE[HY000]: General error:2014 cannot execute queries and other unbuffered queries is active.

Source: Internet
Author: User
Tags mysql version

Server operating system: LINUX

Server environment: nginx1.4.7

PHP Version: php5.6.9

MySQL version: Mysql5.5.34-log

Open Source framework: Tpshop

Error Details:

SQLSTATE[HY000]: General error:2014 cannot execute queries and other unbuffered queries is active. Consider using Pdostatement::fetchall (). Alternatively, if your code is a ever going to run against MySQL, you may enable query buffering by setting the Pdo::my Sql_attr_use_buffered_query attribute.

Search for a workaround:

Line 28th in application/database.php

// Database connection Parameters ' params '         = [],

Modify the following

// Database connection Parameters ' params '         array(        ' 1002 '  =  "SET NAMES UTF8",   # Initial query        ' + '  =  true,               #pdo::mysql_attr_use_buffered_query),

I'm not going to report this mistake after the change.

SQLSTATE[HY000]: General error:2014 cannot execute queries and other unbuffered queries is active.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.