Gossamer Forum
Home : Products : Gossamer Links : Discussions :

DBI Not found, but it *is* installed.

Quote Reply
DBI Not found, but it *is* installed.
Hi,

We just moved out LinkSQL website(s) to another server but at the moment we're having some problems with it. LinkSQL says the following when I want to reconfigure LinksSQL:

Error: Could not connect to database. Reason: DBI module not installed. You must install the perl database module DBI from: http://www.perl.com/...odules/by-module/DBI

The problem is: DBI *is* installed. I even installed it with CPAN succesfully. We are running a normal RedHat9 configuration (with directadmin control panel) and it comes with perl 5.8.0.

If I can hack into some code to let LinkSQL find DBI, it's also okay.

We have a lot of sites to move and this single thing does not work.

Thanks in advance!
Quote Reply
Re: [Jesper] DBI Not found, but it *is* installed. In reply to
I've had this problem before where Perl was using a different version compared to the version DBI was installed. i.e it was working on 5.8.1, but not 5.8.2.

Not sure if that helps at all though.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] DBI Not found, but it *is* installed. In reply to
Possibly, but I have only one Perl version installed. I don't want to install older perl versions on this system. That will mess things up..

So, LinksSQL doesn't have much choice. I have perl 5.8.0 with DBI or perl 5.8.0 with DBI... ;)
Quote Reply
Re: [Jesper] DBI Not found, but it *is* installed. In reply to
Have you tried it with a simple test script?

Code:
#!/usr/bin/perl

use strict;
use DBI;

my $user = '';
my $pass = '';
my $host = 'localhost';
my $db_name = '';

my $dbh = DBI->connect ("DBI:mysql:$db_name:$host", $user, $pass,
{PrintError => 0, RaiseError => 1})
or die print "Cannot connect to database: ", $!;

my $sth= $dbh->prepare ("SELECT * FROM Categories");
$sth->execute() || die $!;

Does that give you an error?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] DBI Not found, but it *is* installed. In reply to
Hmm..

[root@server1 root]# perl test.pl
DBI object version 1.38 does not match $DBI::VERSION 1.13 at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 249.
BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/DBI.pm line 158.
Compilation failed in require at test.pl line 4.
BEGIN failed--compilation aborted at test.pl line 4.
[root@server1 root]#

The dynaloader is something i saw earlyer. The first time I installed DBI using CPAN, it had a compile error. Do you know how to remove/reinstall DBI with CPAN?

Thanks a lot!
Quote Reply
Re: [Jesper] DBI Not found, but it *is* installed. In reply to
See... its not LSQL's fault Wink

>>>Do you know how to remove/reinstall DBI with CPAN? <<<

Afraid not. My server knowledge is pretty limited I'm afraid.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!