Install Error -- mysql_get_server_info()

drubage - January 22, 2008 - 18:48
Project:Chat Room
Version:5.x-1.9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

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

#1

drubage - January 25, 2008 - 20:37

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

#2

psi-jack - July 20, 2008 - 07:50
Title:Install Error» Install Error -- mysql_get_server_info()
Category:support request» bug report

      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.

#3

arhak - July 20, 2008 - 07:57

What about Postgre???

#4

justinrandell - November 11, 2009 - 12:42

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

#5

justinrandell - November 12, 2009 - 07:19
Status:active» won't fix
 
 

Drupal is a registered trademark of Dries Buytaert.