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*

CommentFileSizeAuthor
#18 698502.patch615 bytescha0s
#8 698502.patch1.83 KBjhodgdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sborsody’s picture

So 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...

    if ($installer->installable()) {
      $databases[$driver] = $installer->name();
    }

Update: Hrm, PDO::getAvailableDrivers returns an empty array.

Sborsody’s picture

Title: Your web server does not appear to support any common database types. » [SOLVED] Your web server does not appear to support any common database types.

On 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.

Sborsody’s picture

Component: install system » documentation
Sborsody’s picture

OMG I love D7 so far! Well done!

catch’s picture

Title: [SOLVED] Your web server does not appear to support any common database types. » Your web server does not appear to support any common database types.
Version: 7.0-alpha1 » 7.x-dev

Yes 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).

Crell’s picture

I 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.

jhodgdon’s picture

Issue tags: +ui-text

So, 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.

jhodgdon’s picture

Status: Active » Needs review
FileSize
1.83 KB

I 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:

For more detailed information about Drupal requirements, including a list of
PHP extensions and configurations that are required, see "System requirements"
(http://drupal.org/requirements) in the Drupal handbook.

I also added PDO to the database error message. New message:

Your web server does not appear to support any common PDO database types. Check with your hosting provider to see if they support PDO (PHP Data Objects) and offer any databases that Drupal supports.

(the link there is to d.o/requirements also).

Here's a patch, covering these two changes to install.txt and install.php.

catch’s picture

Looks good to me.

Crell’s picture

I 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.

jhodgdon’s picture

I 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.

Crell’s picture

IMO, 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.)

jhodgdon’s picture

That sounds like a good plan, but until then should we still make this change?

Crell’s picture

Yes. 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.

jhodgdon’s picture

OK then. catch and I were happy with the current wording. Crell: Do you want it changed or should we RTBC this one?

catch’s picture

Status: Needs review » Reviewed & tested by the community

IMO 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.

Crell’s picture

I'm happy enough with it. Let's do, then follow-up in the other issues.

cha0s’s picture

FileSize
615 bytes

Please 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.

jhodgdon’s picture

That is indeed a better place to do the PDO/database checking.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed #18 to CVS HEAD. This left out the exception stuff though.

pmflav’s picture

Took 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.

jhodgdon’s picture

Thanks, 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.

Status: Fixed » Closed (fixed)
Issue tags: -ui-text

Automatically closed -- issue fixed for 2 weeks with no activity.