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.
Trying to install 7.0-alpha1 on a server that also runs 6.15 and I get this error when the installation process gets to database configuration.
OpenBSD 4.4
Apache 1.3.29
MySQL Server 5.0.51a
PHP 5.2.6
I tried looking at drupal_detect_database_types, but I'm not very familiar with Drupal core code. So, I dunno. Maybe it has something to do with Apache being in a root jail or because the MySQL driver isn't compiled into PHP on OpenBSD but loaded. *shrug*
Comment | File | Size | Author |
---|---|---|---|
#18 | 698502.patch | 615 bytes | cha0s |
#8 | 698502.patch | 1.83 KB | jhodgdon |
Comments
Comment #1
Sborsody CreditAttribution: Sborsody commentedSo far, inside function drupal_detect_database_types in includes/install.inc, none of the installers end up being installable so there's nothing returned in $databases. More later...
Update: Hrm, PDO::getAvailableDrivers returns an empty array.
Comment #2
Sborsody CreditAttribution: Sborsody commentedOn OpenBSD the php5 pdo mysql connection is not installed by default. It is an extra package, i.e., http://www.openbsd.org/4.4_packages/i386/php5-pdo_mysql-5.2.6.tgz-long.html So while PDO support was available in the default PHP installation on OpenBSD, no actual PDO driver was enabled. To be clear, extension_loaded('pdo') returns 1 but there's no actual pdo drivers until after I installed the package linked above.
Since PDO is a change from 6.x, I strongly encourage the INSTALL.txt documentation to be updated to reflect this new requirement.
Comment #3
Sborsody CreditAttribution: Sborsody commentedComment #4
Sborsody CreditAttribution: Sborsody commentedOMG I love D7 so far! Well done!
Comment #5
catchYes I've seen people run into this elsewhere. Either the "no supported database types" message needs to be extended, or we just document this somewhere (other than troubleshooting).
Comment #6
Crell CreditAttribution: Crell commentedI would extend the error message. People aren't going to read documentation; they're just going to download Drupal, click install, and wonder why it's not working.
Comment #7
jhodgdonSo, it looks like we should add something to install.txt (on the off chance someone might read it) -- it currently says nothing about PDO.
We should also change that error message so it says something about PDO, which is a UI text issue. So, adding a tag.
Comment #8
jhodgdonI added a note about PDO to the database section of http://drupal.org/requirements (pointing to lower down on the page for more details).
Given that there are quite a few other PHP config/extension requirements on that page, and none of them are currently mentioned in INSTALL.txt, I thought the best course of action there was to expand the paragraph suggesting people read the handbook, rather than adding PDO explicitly. New paragraph:
I also added PDO to the database error message. New message:
(the link there is to d.o/requirements also).
Here's a patch, covering these two changes to install.txt and install.php.
Comment #9
catchLooks good to me.
Comment #10
Crell CreditAttribution: Crell commentedI like this, although it's only part of the solution. It's still a step forward.
I'm not sure if I'd say "PDO database types", or just "does not support any Drupal-supported database drivers", or something like that.
Comment #11
jhodgdonI thought that since the most common cause of seeing this was probably that PDO wasn't installed/enabled, mentioning PDO was useful. But we can definitely change it.
Comment #12
Crell CreditAttribution: Crell commentedIMO, PDO should probably be handled over here as part of this issue: #641408: PHP extensions and PDO functionality should be checked at installation. (See the post-commit follow-ups.)
Comment #13
jhodgdonThat sounds like a good plan, but until then should we still make this change?
Comment #14
Crell CreditAttribution: Crell commentedYes. Checking that PDO exists is a basic check for Drupal itself. Checking that we have a supported database available is part of the DB phase of the installer, and should be handled as gracefully as possible.
Comment #15
jhodgdonOK then. catch and I were happy with the current wording. Crell: Do you want it changed or should we RTBC this one?
Comment #16
catchIMO this should explicitly mention PDO. I've seen people come on irc with PDO and php5-mysql, but not PDO MySQL for whatever reason. So they have PDO support, and PHP support for MySQL, but they still get this message, and get very confused.
Comment #17
Crell CreditAttribution: Crell commentedI'm happy enough with it. Let's do, then follow-up in the other issues.
Comment #18
cha0s CreditAttribution: cha0s commentedPlease see my notes/patch on #641408: PHP extensions and PDO functionality should be checked at installation.. I don't think we should be throwing an exceptioon on the settings page; we can catch it much earlier in system_requirements(). However the change in wording in install.txt is still usable. I attached a patch with only that change.
Comment #19
jhodgdonThat is indeed a better place to do the PDO/database checking.
Comment #20
Dries CreditAttribution: Dries commentedCommitted #18 to CVS HEAD. This left out the exception stuff though.
Comment #21
pmflav CreditAttribution: pmflav commentedTook a bit for me to figure this one out.
But you will need to do the following:
pecl install pdo
AND
pecl install pdo_mysql
Then restart your server.
Comment #22
jhodgdonThanks, I've added the note above to the http://drupal.org/requirements page. If you have any further ideas for that page, please file a new issue.