My drupal based website was working fine till yesterday but suddenly from no where today an error appeared
Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /.../includes/database/mysql/database.inc on line 43
I didn't even changed or updated anything since yesterday, it suddenly appears from no where, before that it was working fine
On line 43 of database.inc this was written
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE,
I googled and got some idea that this is some sort of PDO_MYSQL error, i have not much idea why this error suddenly arrived
Can anyone please help me out
Additional information
According to a lot of different sources the pdo_mysql extension must be missing from your PHP installation. Either add it in php.ini or ask your hosting provider to do it for you.
Links:
They all say the same thing...install the pdo_mysql extension. Sounds like your hosting provider has disabled it!
This can also be due to a permissions issue. Sometimes, given the use of SuPHP or other configurations in which the apache (or other server) user can't run a file, you'll get this sort of error and PDO_MYSQL: will already be installed and operational.
If you have root access to the box, try doing a
sudo php /path/to/your/php/script.php
or recursively chown the directory to the appropriate apache user (usually apache or www-data) or the user who's home directory your files are resting in (the case in most shared servers).
chown -R apache:apache /path/to/web/files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With