Loading...
 
Skip to main content

Update to Tiki >= 5.3 fails on Windows ("Cannot execute queries while other unbuffered queries are active")

Status
Closed
Subject
Update to Tiki >= 5.3 fails on Windows ("Cannot execute queries while other unbuffered queries are active")
Version
6.x
Category
  • Error
Feature
Database MySQL (MyISAM)
Installer (profiles, upgrades and server-related issues)
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Resolution status
Fixed or Solved
Submitted by
Gregor (gta74)
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

On updating Tiki 5.2 and earlier to 6 errors occur during installation.

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.


The problem is discussed over here

--
Chealer:
This does not happen upgrading from a clean install of 5.3 to 6.0. But it happens when upgrading from 5.0 to 6.0. The most problematic script appears to be 20100927_better_column_fix_tiki. The first query (getOne() on information_schema) seems to be the sticky unbuffered query sometimes, since the following, second query fails. I tried but couldn't find how to confirm what query is stuck. It's odd that this problem only happens in the installer. getOne() just like query() use fetchAll() so we shouldn't see this problem. Setting MYSQL_ATTR_USE_BUFFERED_QUERY doesn't seem to help. After some 10 hours of debugging I'm under the impression this is a PDO bug. This looks like http://bugs.php.net/bug.php?id=44081 If anyone wants to try fixing, I recommend speaking to me first. The PDO documentation is very poor, making this really difficult.
20100927_better_column_fix_tiki was introduced in 5.3.

I found upgrades would work with PDO in certain environments. I had the bug on PHP 5.2.13 but upgrading to 5.3.3 fixed. PHP 5.3 can use mysqlnd, which I suspect doesn't have this problem. The upgrade worked for me on vanilla PHP 5.3.3 or PHP 5.3.3 from EasyPHP, both with mysqlnd. I have no clue why this problem seems to only affect Windows, but I saw reports of similar problems on Debian etch, so it may not be completely Windows-specific. Anyone who experiences this problem, please report your PHP version, and if you use PHP 5.3, indicate whether you use libmysql or mysqlnd.

Solution
Workaround

If you add the following line

$api_tiki = 'adodb';

to your db/local.php file, the installation of tiki 6 works for me then.

Importance
7
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3658
Created
Monday 15 November, 2010 07:18:27 UTC
by Gregor (gta74)
LastModif
Tuesday 30 June, 2026 09:59:08 UTC


Show PHP error messages