Jump to content
  • 0

Unbuffered Queries in FluxCP-rA


Boom

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  182
  • Reputation:   22
  • Joined:  12/30/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   18
  • Joined:  01/28/12
  • Last Seen:  

is it just me? or the screenshot is so small? 

Link to comment
Share on other sites

×
×
  • Create New...