-1

I have just upgraded to 16.10 from 16.04. I currently have PHP5.6 installed and have just tried to run a command in the terminal which is throwing the following error:

$ drush cc all
PHP Fatal error:  Uncaught Error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY'

When I search online for how to resolve this I keep finding results that tell me to enable things like the php5-mysql extension. However I already have these extensions enabled.

Does anyone know how I can debug this and resolve it?

2
  • UPDATE: I fixed it. Though a bit counter intuitive I just had to install PHP7.0-mysql. – dibs Oct 26 '16 at 22:48
  • Use code formatting for command output, please. meta.askubuntu.com/q/15152/158442 – muru Oct 31 '16 at 5:38
1

Though I am running PHP5.6 it turns out I still needed to install the PHP 7.0 mysql extension.

$ sudo apt-get install php7.0-mysql

Now it all seems to be working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.