Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The error that occurs is:
Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /www/drupalhead/includes/database/mysql/database.inc on line 31
This same instance of drush works perfectly on my localhost d6 and d5 sites, so I assume we're just chasing head here, but I wanted to report it anyway for sanity's sake. :)
Comments
Comment #1
Senpai CreditAttribution: Senpai commentedComment #2
macattack2k CreditAttribution: macattack2k commentedI'm receiving the same message running
drush update
on 7.x-dev. Elsewhere in the world, PHPers were complaining about it: http://bugs.php.net/bug.php?id=47224I'm not savvy enough to handle this one personally.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commenteddrush is not d7 compatible for the most part. and anyway, db updates from head to head are not supported by drupal.
Comment #4
mgiffordI got the same error with the latest CVS version while using simpleTest:
$ /usr/bin/php ./scripts/run-tests.sh --url http://localhost:8888/drupal-cvs/ --clean
Fatal error: Undefined class constant 'MYSQL_ATTR_USE_BUFFERED_QUERY' in /Applications/MAMP/htdocs/drupal-cvs/includes/database/mysql/database.inc on line 31
Comment #5
scor CreditAttribution: scor commentedI had the same problem on Mac OS using MAMP when I tried to run the run-test.sh on D7 like in #4. The problem was simply due to a bad version of PHP. Using the MAMP php binary works:
hope that helps.
Comment #6
vosechu CreditAttribution: vosechu commentedTo get d7's installer going edit /Applications/MAMP/conf/php5/php.ini and uncomment the pdo_mysql extension to get MySQL running.
Comment #7
tajh CreditAttribution: tajh commentedOn FreeBSD, you need to install the pdo_mysql module on top of your PHP installation:
portmaster databases/php5-pdo_mysql
or
cd /usr/ports/databases/php5-pdo_mysql; make install;
If you haven't already installed mbstring do that too: portmaster converters/php5-mbstring
The ports automatically edit your php/extensions.ini file for you.
Restart your webserver, then start the installation.
Comment #8
sukr_s CreditAttribution: sukr_s commentedworks if php_pdo_mysql is enabled. You can do this by uncommenting extension=php_pdo_mysql.dll in php.ini and restarting apache
Comment #9
anand CreditAttribution: anand commentedReceived the same error on linux (Ubuntu 10.10), solution was to install php5-mysql . Note that /etc/php5/conf.d/pdo.ini already enabled the pdo option.