Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Gossamer Forum 1.2.3 (small bug)

Quote Reply
Gossamer Forum 1.2.3 (small bug)
I've encountered what I assume is a small bug whilst installing Gossamer Forum 1.2.3.

I have MySQL 4.1 installed and was trying to install Gossamer Forum 1.2.3.

When I entered my SQL server details and hit submit I was returned to the same page with the message:

Quote:
Error: Could not connect to database:

Please fix the error below and try again:

No error message was displayed.

I started hunting down the cause and arrived at the connect() method in GT::SQL::Driver. A call to DBI->connect() is eval'd and either dies with $DBI::errstr or returns true. The next line:

Code:
$res or return $self->warn(CANTCONNECT => $@);

...fails to write the error message to the log file and appears to fail to set $GT::SQL::error and so the error message is not displayed to the user.

I was playing about with a few ideas and decided to try and print a few warnings to the log. I put:


$self->warn(CANTCONNECT => "Ye devil!");

...ABOVE the eval() and low and behold, the error message I'd been looking for appeared!...which was:

Quote:
Client does not support authentication protocol requested by server; consider upgrading MySQL client

...which incidentally seems to be related to DBI not supporting the MySQL 4.1 libraries.

http://dev.mysql.com/...l/en/old-client.html

Anyhow, it looks like perhaps it is something to do with GT::Base, but I've now lost the will to live so I'll let a staff member hunt down the cause - hehe!
Quote Reply
Re: [Gmail] Gossamer Forum 1.2.3 (small bug) In reply to
Hi,

A quick fix to be able to see the error message is to change:

Code:
$res or return $self->warn(CANTCONNECT => $@);

to:

Code:
$res or return $self->warn(CANTCONNECT => "$@");

As for the error message itself, recompiling DBD::mysql against 4.1 mysql client libs should fix the problem.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Gossamer Forum 1.2.3 (small bug) In reply to
Thanks!

Why would not quoting $@ cause the error not to display? ...would $@ not get passed to warn() as a string without the quotes?

Regarding DBD::mysql, I'm using Windows XP so I used the quick fix in the documentation which was to use the old style password hash.