[SOLVED] PHP fatal error 'Undefined class constant MYSQL_ATTR_USE_BUFFERED_QUERY'?

| | 1 min read

While settings up local installation in my system I came across this error (PHP fatal error 'Undefined class constant MYSQL_ATTR_USE_BUFFERED_ QUERY'). I tried a lot to fix it. Finally got the solution as follows. The reason for this error is missing pdo_mysql extension in my PHP installation.

Install the php5-mysql on Ubuntu using the following command:

sudo apt-get install php5-mysql

Restart apache using the command:

 sudo service apache2 restart 

Notes:

'MYSQL_ATTR_USE_BUFFERED_QUERY' is to store the whole recordset in memory. If this is set to TRUE then the MySQL driver will use the buffered versions of the MySQL API.

You may also look into other solved issues related to MYSQL over here.

For further information, click here. For more queries, please get in touch.