Forums / Cotonti / Support / Help with0.9.6 install

PDO error

CorpQuid
#1 2011-12-27 03:36

I was wondering if anyone has experienced this issue with v0.9.6?

After searching all over the web I can not find any resolution to this problem. The only thing I could find was https://bugs.php.net/bug.php?id=44081 for the PDO error. I also updated to the latest version of PHP an still the issue remains. so If anyone could assist in figuring out what this problem is please let me know.

(I did try using fetchAll and also closing each statement $stmt = null)

Title of your site
2011-12-27 01:39

Fatal error: SQL error 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.

#0  cot_diefatal(SQL error 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.) called at [/home/mysite/public_html/system/database.php:449]
#1  CotDB->query(SELECT * FROM cot_core
		WHERE ct_state = 0 AND ct_lock = 0) called at [/home/mysite/public_html/system/common.php:212]
#2  require_once(/home/mysite/public_html/system/common.php) called at [/home/mysite/public_html/index.php:37]
GHengeveld
#2 2011-12-27 16:21
Can you provide some details about the server/webhost?
CorpQuid
#3 2011-12-27 16:40

Sure what information other than the following do you need

Apache version 2.2.9

PHP version 5.3.2

MySQL version 5.0.92-community

Trustmaster
#4 2011-12-27 17:27

Weird. There don't seem to be any unclosed cursors before that line. Could you try switching cache off ($cfg['cache'] = false in datas/config.php)?

May the Source be with you!
CorpQuid
#5 2011-12-28 04:04

Hey sorry for the delay in getting back to you, I got side tracked with going to a web site that gave me the win 7 2012 trojan... I got it all removed now. But just to let you guys know make sure your java is up to date. There is a vulnerability that injects itself in an advertisement banner through a java script.

Ok anyways back to the issue at hand, I set the following and strangly it removed the duplicate line from the page but I still get the the below error.

$cfg['cache'] = FALSE;   // Enable data caching
$cfg['cache_drv'] = '';   // Cache driver name to use on your server (if available)
        // Possible values: APC, eAccelerator, Memcache, Xcache
$cfg['xtpl_cache'] = TRUE;  // Enable XTemplate structure disk cache. Should be TRUE on production sites
$cfg['html_cleanup'] = FALSE; // Wipe extra spaces and breaks from HTML to get smaller footprint

 

Title of your site
2011-12-28 04:01

Fatal error: SQL error 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.

#0  cot_diefatal(SQL error 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.) called at [/home/mysite/public_html/system/database.php:449]
#1  CotDB->query(SELECT * FROM cot_core
		WHERE ct_state = 1 AND ct_lock = 0) called at [/home/mysite/public_html/system/common.php:212]
#2  require_once(/home/mysite/public_html/system/common.php) called at [/home/mysite/public_html/index.php:37]

 

Added 23 minutes later:

I just want to up date you as to what is displayed when setting the config value to both true and false

 This is with $cfg['cache'] = TRUE;

Title of your site
2011-12-28 04:25

Fatal error: SQL error 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.

#0  cot_diefatal(SQL error 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.) called at [/home/mysite/public_html/system/database.php:449]
#1  CotDB->query(SELECT * FROM cot_core
		WHERE ct_state = 1 AND ct_lock = 0) called at [/home/mysite/public_html/system/common.php:212]
#2  require_once(/home/mysite/public_html/system/common.php) called at [/home/mysite/public_html/index.php:37]

Title of your site
2011-12-28 04:25

Fatal error: SQL error 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.

#0  cot_diefatal(SQL error 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.) called at [/home/mysite/public_html/system/database.php:449]
#1  CotDB->query(INSERT INTO cot_cache (c_name, c_realm, c_expire, c_value) VALUES ('cot_cache_bindings', 'system', 0, 'a:0:{}'),('cot_plugins', 'system', 0, 'N;'),('cot_plugins_active', 'system', 0, 'a:0:{}') ON DUPLICATE KEY UPDATE c_value=VALUES(c_value), c_expire=VALUES(c_expire)) called at [/home/mysite/public_html/system/cache.php:651]
#2  MySQL_cache->flush() called at [/home/mysite/public_html/system/functions.php:909]
#3  cot_shutdown() called at [(null):0]




Here it is with $cfg['cache'] = FALSE; 



Title of your site
2011-12-28 04:29

Fatal error: SQL error 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.

#0  cot_diefatal(SQL error 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.) called at [/home/mysite/public_html/system/database.php:449]
#1  CotDB->query(SELECT * FROM cot_core
		WHERE ct_state = 1 AND ct_lock = 0) called at [/home/mysite/public_html/system/common.php:212]
#2  require_once(/home/mysite/public_html/system/common.php) called at [/home/mysite/public_html/index.php:37]
This post was edited by CorpQuid (2011-12-28 04:28, 12 years ago)
Trustmaster
#6 2011-12-28 09:53

Could you try this version of system/common.php and see if it makes any difference?

May the Source be with you!
CorpQuid
#7 2011-12-28 19:12

After putting in the new common file now the error changed

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2050 ' in /home/mysite/public_html/system/common.php:208 Stack trace: #0 /home/mysite/public_html/system/common.php(208): PDOStatement->fetchAll() #1 /home/mysite/public_html/index.php(37): require_once('/home/mysite/...') #2 {main} thrown in /home/mysite/public_html/system/common.php on line 208

Added 5 days later:

#32308 Trustmaster:

Could you try this version of system/common.php and see if it makes any difference?

Just wanted to bump this to see if you have any more ideas?

Thanks for your help by the way Trustmaster and GHengeveld

This post was edited by CorpQuid (2012-01-03 23:14, 12 years ago)
elfrenazo
#8 2012-01-03 23:39

That happened to me.
delete this line in the file  /datas/config-sample.php

$cfg['mysqlcharset'] = 'utf8';

Trustmaster
#9 2012-01-04 07:29

Well, according to Google, it's a bug in PHP on some systems. Changing PHP version helps in some cases. Try updating to 5.3.8.

May the Source be with you!