in includes/handlers.inc line 1113 :

      elseif ($GLOBALS['db_type'] == 'mysqli' || version_compare(mysql_get_server_info(), '4.1.3', '>=')) {

If you do not have the mysql extension enabled then using mysql_get_server_info() will result in a fatal error.

Perhaps the following would be a solution. Starting at line 1110 :

      if ($GLOBALS['db_type'] == 'pgsql') {
        db_query("SET TIME ZONE INTERVAL '$offset' HOUR TO MINUTE");
      }
      elseif ($GLOBALS['db_type'] == 'mysqli') {
        db_query("SET @@session.time_zone = '$offset'");
      }
      elseif ($GLOBALS['db_type'] == 'mysql' && version_compare(db_version(), '4.1.3', '>=')) {
        db_query("SET @@session.time_zone = '$offset'");
      }

I don't know enough about the functionality to propose a proper patch.

Additionally, though only a potential issue with Pressflow or Drupal 7 and in a multi-database setup, knowing which db resource to compare could be required.

Thanks.

Comments

dawehner’s picture

db_version sounds like a good plan.

Can you fill a patch for it?

dawehner’s picture

Status: Active » Fixed

Commited to both 6.x-2.x and 6.x-3.x

Status: Fixed » Closed (fixed)

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

merlinofchaos’s picture

Status: Closed (fixed) » Active

This commit is causing notices because the committed code uses db_version not db_version()

merlinofchaos’s picture

Pushed a fix.

dawehner’s picture

Status: Active » Fixed

So this is fixed.

Status: Fixed » Closed (fixed)

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