Hi there,

When I try to install this module I get the following error:

Fatal error: Call to undefined function mysql_get_server_info() in D:\tribalectic\Drupal\sites\all\modules\chatroom\chatroom.install on line 33

I am running Drupal 5.6 with mySql 5.0.41 and PHP 5.2.3. See my phpinfo here:

http://www.tribalectic.com/phpinfo.php

I am using mysqli should that line be different? I thought about just commenting that line out as the check seems unnecessary knowing the versions I have but please any help would be appreciated!

-Drew

Comments

drubage’s picture

Well I commented out these lines and it SEEMS to work:

//      if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
//        $utf_declaration = 'DEFAULT CHARACTER SET utf8';
//      }

-Drew

psi-jack’s picture

Title: Install Error » Install Error -- mysql_get_server_info()
Category: support » bug
      if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
        $utf_declaration = 'DEFAULT CHARACTER SET utf8';
      }

Just needs to be changed to:

      if (version_compare(db_version(), '4.1.0', '>=')) {
        $utf_declaration = 'DEFAULT CHARACTER SET utf8';
      }

This solves it and uses proper Drupal API, and allows Drupal MySQL authentication to take place which is the biggest deal. mysql_get_server_info() is a proper function for MySQL, but it'll try to connect without a password with this command.

Suggest correction in code.

arhak’s picture

What about Postgre???

Anonymous’s picture

i'm not really interested in fixing bugs in the 5.x branch, but i'll help anyone who posts patches. patch anyone?

Anonymous’s picture

Status: Active » Closed (won't fix)