in includes/handlers.inc line 1113 :

<?php
     
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 :

<?php
     
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

db_version sounds like a good plan.

Can you fill a patch for it?

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.

Status:Closed (fixed)» Active

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

Pushed a fix.

Status:Active» Fixed

So this is fixed.

Status:Fixed» Closed (fixed)

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