While clicking on Drupal 7.12 Configuration tab

Uncaught exception thrown in session handler.

PDOException: 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 _drupal_session_write() (line 207 of /opt/lampp/htdocs/transform/includes/session.inc).

Comments

premgangwar’s picture

It shows you did not installed php module for msyql.
Use this command to install php module on ubuntu
sudo apt-get install php5-mysql. This works for me.

liberatr’s picture

Hi ilechcod,

We are having a similar error - in this case we are using the "tokenauth" module, and there are some connections to a Postgres DB in the background, in addition to MySQL. I saw a page that refers to the error premgangwar is talking about - I don't think that General error 2014 would show up if you did not have the mysql extension installed - we have it on our machine.

I went to go see how I could turn on this MYSQL variable and it turns out Drupal's database layer turns it on by default.
http://api.drupal.org/api/drupal/includes%21database%21mysql%21database....
Line 22 - they set it to TRUE.

Setting it to false causes errors on every page instead of just the one we had a problem with.

ilechcod’s picture

@liberatr,
I think you are right. I do have the mysql extension installed (actually I am using lampp - so the possibility of not having that installed is near zero -since the whole package comes together).

So what then is the solution to this error? I'm scared it might show up on my production site sometime soon.

AFFLemos’s picture

Hi,
I've just upgraded around 10 modules and now this error appears.
As far as i can see, everything is like the code in the link
What can i do?

Cheers,

ilechcod’s picture

@AFFLemos,
Could you please post your Drupal, apache, php, and mysql configurations?

AFFLemos’s picture

Hi ilechcod,

it was a server problem because i asked the hosting company and they fixed the problem.

Thanks