Loading

[SOLVED] Update to 2.1: PDO Warning in class.project.php

Get help with problems, or report & discuss bugs in Collabtive

[SOLVED] Update to 2.1: PDO Warning in class.project.php

Postby Cesar » 13.03.2015, 11:18

Hello,
after the update I get the following error:


Warning: PDO::prepare(): SQLSTATE[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. in /var/www/task.website.com/include/class.project.php on line 289

Fatal error: Call to a member function execute() on a non-object in /var/www/task.website.com/include/class.project.php on line 290


Now I no longer access. Accessing the file "update.php" I will return blank page. :?
Cesar
 
Posts: 9
Joined: 28.06.2014, 20:03

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Eva » 13.03.2015, 12:59

Hi Cesar,

sorry that the update got stuck! Let's try to fix this. :)

Could you please see if this change solves the problem?

- Please open the file ./include/class.projekt.php in a text editor.
- Now find line 290, where it says:
Code: Select all
$project = $sel->fetch();

- Replace the line to say this instead:
Code: Select all
foreach ($sel->fetchAll() as $proj) {
    $project = $proj[0];
    break;
}

$sel->closeCursor();


Now upload the file to overwrite the original on your server.
Try to reload the Collabtive login page.

Can you login now?
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Cesar » 13.03.2015, 13:38

Ok, now I see the login page and "update.php"
But now there is another problem: after entering the login data comes out these other errors:


Code: Select all
Warning: Illegal string offset 'end' in /var/www/task.website.it/include/class.project.php on line 300

Warning: Illegal string offset 'end' in /var/www/task.website.it/include/class.project.php on line 301

Warning: Illegal string offset 'daysleft' in /var/www/task.website.it/include/class.project.php on line 302

Warning: Illegal string offset 'end' in /var/www/task.website.it/include/class.project.php on line 303

Warning: date() expects parameter 2 to be long, string given in /var/www/task.website.it/include/class.project.php on line 303

Warning: Illegal string offset 'endstring' in /var/www/task.website.it/include/class.project.php on line 304

Warning: Illegal string offset 'start' in /var/www/task.website.it/include/class.project.php on line 310

Warning: date() expects parameter 2 to be long, string given in /var/www/task.website.it/include/class.project.php on line 310

Warning: Illegal string offset 'startstring' in /var/www/task.website.it/include/class.project.php on line 311

Warning: Illegal string offset 'ID' in /var/www/task.website.it/include/class.project.php on line 313

Warning: Illegal string offset 'done' in /var/www/task.website.it/include/class.project.php on line 313

Warning: Illegal string offset 'customer' in /var/www/task.website.it/include/class.project.php on line 316

Warning: PDO::prepare(): SQLSTATE[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. in /var/www/task.website.it/include/class.project.php on line 289

Fatal error: Call to a member function execute() on a non-object in /var/www/task.website.it/include/class.project.php on line 290



Cesar
 
Posts: 9
Joined: 28.06.2014, 20:03

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Eva » 13.03.2015, 14:40

There was a little bug in my previous posting.

Please try this instead - it should at least make some of the warnings go away:

Code: Select all
foreach ($sel->fetchAll() as $proj) {
    $project = $proj;
    break;
}

$sel->closeCursor();
Project Management the way you like it: Collaborative - Open Source - Free

facebook.com/Collabtive
twitter.com/Collabtive
xing.com/companies/collabtive
linkedin.com/company/collabtive
User avatar
Eva
 
Posts: 1471
Joined: 01.01.2008, 23:31
Location: Saarbrücken, Germany

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Cesar » 13.03.2015, 17:12

now goes out only this error:

Code: Select all
Warning: PDO::prepare(): SQLSTATE[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. in /var/www/task.website.it/include/class.project.php on line 289

Fatal error: Call to a member function execute() on a non-object in /var/www/task.website.it/include/class.project.php on line 290
Cesar
 
Posts: 9
Joined: 28.06.2014, 20:03

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby ITA003 » 13.03.2015, 19:49

After upgrade from 2.0, I got this error to.

In my dev enviroment works fine. Same php version 5.4.38 and the phpinfo looks the same.
ITA003
 
Posts: 3
Joined: 13.03.2015, 19:46

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Philipp » 14.03.2015, 00:28

Confirmed the bug. This seems only to happen on some php/mysql combinations.

Fix is here:
https://github.com/philippK-de/Collabti ... 800e315166

We will release an update shortly.
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby ITA003 » 14.03.2015, 00:49

That's works!

Thanks!
ITA003
 
Posts: 3
Joined: 13.03.2015, 19:46

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby Philipp » 14.03.2015, 01:04

I pushed an updated archive out, containing this fix:
https://github.com/philippK-de/Collabti ... ve-211.zip

please confirm it works properly for you.
User avatar
Philipp
Site Admin
 
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Update to Collabtive 2.1: PDO Warning in class.project.p

Postby ITA003 » 14.03.2015, 09:08

Works!!

Thanks!
ITA003
 
Posts: 3
Joined: 13.03.2015, 19:46

Next

Return to Problems and Bugs

Who is online

Users browsing this forum: Bing [Bot]

cron