Jump to content
  • 0

Unbuffered Queries in FluxCP-rA


Question

Posted

Hi! After a long hiatus (because of schoolwork), I'm coming back to the rA community.

 

Seen new things coming and one of which is the new FluxCP-rA: http://rathena.github.io/FluxCP/

 

Upon installing, I've encountered this error:

Untitled.png

 

So, after looking for round-about, I used this method:

on \lib\Flux\Installer\Schema.php

public function install($version)
{
if (!array_key_exists($version, $this->schemaInfo['versions']) || !$this->schemaInfo['versions'][$version]) {
// Switch database.
$this->connection->useDatabase($this->databaseName);
 
// Get schema content.
$sql = file_get_contents($this->schemaInfo['files'][$version]);
$sth = $this->connection->getStatement($sql);
 
// Execute.
$sth->execute();
unset($sth); //ADDED THIS LINE

I'm using the required versions of PHP and MySQL and PDO BTW. Not quite sure if this is a bug or anything. Just wanted to post it so it can be looked at if it is a bug or not.

2 answers to this question

Recommended Posts

Posted
Oh, I think postimage.org lowered the resolution for some reason. Anyway the PDO error was:


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.

 

I think the problem was with the PDO extension loaded on the PHP version I'm using which was PHP 5.2.17. I upgraded the version to the latest and the problem went away.

 

This control panel's requirement was PHP5.x so I guess it may have some problems with versions lower than 5.2.17 or so.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...