I kept encountering error messages that all the forums for the ClickCart said indicated a my server has bad DBI module. They all said the server admin should reinstall it. The problem is that I'm that admin, and, while I know how to deal with most of my server - I'm new to Perl ...And I need to start using this app asap.
Given some other variables that made me doubt how precise an error this was, I finally broke down and paid the developer to install it for me. He took care of any other issues, and still encountered the same problem as I did - this error message:
Can't locate loadable object for module DBI in @INC (@INC contains:
/Users/somatics/Sites/ccp51/cgi-bin/modules_lib
/System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin
/Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl .
/Users/somatics/Sites/ccp51/cgi-bin/modules_inc
/Users/somatics/Sites/ccp51/cgi-bin/modules_dbi) at
/Users/somatics/Sites/ccp51/cgi-bin/modules_dbi/DBI.pm line 255
----------------------
His note to me was:
This indicates the following:
The loadable object error is indicative of a bad DBI module on the
server.
I can make the script run in this environment but you will not be able
to use MySQL.
----------------------
He told me I need to deal with the bad DBI module. I've searched all over perl.com, Apple's support site, etc. places - and I can't find any actual explanation of what to download or where and where to install it.
Please help!
Thanks!
You could definitively establish whether the module exists on the filesystem with a shell command like this (in the Terminal application):
find / -name DBI.pm -print
Unfortunately I'm not very familiar with Perl on Macs so don't know the best way to install a missing module though.
Regarding your suggestion (b): But is that what I'm looking for? Or am I looking for it in some installed, operating systemwide Perl directory?
Regarding your suggestion (a): How do I put the directory in Perl's @INC array? Is that a file I need to open in BBEdit and add a line to? Or is there a program I need to run to update a directory? Where is the @INC array? Is it animal, vegetable, or mineral?
Here's the search results from Terminal:
root# find / -name DBI.pm -print
/private/var/root/.cpan/build/DBI-1.39/blib/lib/Bundle/DBI.pm
/private/var/root/.cpan/build/DBI-1.39/blib/lib/DBI.pm
/private/var/root/.cpan/build/DBI-1.39/DBI.pm
/private/var/root/.cpan/build/DBI-1.39/lib/Bundle/DBI.pm
/private/var/root/ccp51/cgi-bin/modules_dbi/lib/Bundle/DBI.pm
/private/var/root/ccp51 copy/cgi-bin/modules_dbi/DBI.pm
/private/var/root/DBI.pm
/Shared Items/applications_installed_masters/MT-3.121-full-en_us copy.121-full-en_us/lib/MT/ObjectDriver/DBI.pm
/Shared Items/applications_installed_masters/sw/lib/perl5/5.6.0/darwin/Bundle/DBI.pm
/Shared Items/applications_installed_masters/sw/lib/perl5/5.6.0/darwin/DBI.pm
/Shared Items/applications_installed_masters/sw/share/doc/dbi-pm560/DBI.pm
/Shared Items/applications_installed_masters/sw/src/time-hires-pm560-1.42-2/Time-HiRes-1.42/DBI.pm
/Users/hsea/Sites/web-public/main/cgi/mt/lib/MT/ObjectDriver/DBI.pm
/Users/somatics/Sites/ccp51/cgi-bin/modules_dbi/DBI.pm
/Users/somatics/Sites/cgi/mt/lib/MT/ObjectDriver/DBI.pm
/Users/somatics/Sites/mt/lib/MT/ObjectDriver/DBI.pm
perl -e 'use DBI;'
and report what it says?
Looking at it again I think the problem might be slightly different, i.e. DBI is not finding the requisite database driver module, which would be DBD::mysql.
Can you try also:
perl -e 'use DBD::mysql;'?
If there's no DBD::mysql module, you can do the following as root user:
perl -MCPAN -e 'install DBD::mysql'
and the module should be downloaded and installed for you. (It looks like someone has used the same process to install DBI.pm previously).
[fred:~] root# perl -e 'use DBI;'
Can't locate loadable object for module DBI in @INC (@INC contains: /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl /Network/Library/Perl .) at DBI.pm line 255
BEGIN failed--compilation aborted at DBI.pm line 255.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
******************************************************************
[fred:~] root# perl -e 'use DBD::mysql;'
Can't locate DBD/mysql.pm in @INC (@INC contains: /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl /Network/Library/Perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
******************************************************************
[fred:~] root# perl -MCPAN -e 'install DBD::mysql'
Please, install Net::FTP as soon as possible. CPAN.pm installs it for you
if you just type
install Bundle::libnet
Issuing "/usr/bin/ftp -n"
Trying 209.221.142.118...
Connected to ftp.cpan.ddns.develooper.com.
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 08:42. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
230 Anonymous user logged in
Remote system type is UNIX.
Using binary mode to transfer files.
Local directory now /private/var/root/.cpan/sources/authors
250 OK. Current directory is /
250 OK. Current directory is /pub
250-The Comprehensive Perl Archive Network (http://www.cpan.org/)
250-master site has been from the very beginning (1995) hosted at FUNET,
250-the Finnish University NETwork.
250-
250-
250 OK. Current directory is /pub/CPAN
250 OK. Current directory is /pub/CPAN/authors
200 TYPE is now 8-bit binary
local: 01mailrc.txt.gz remote: 01mailrc.txt.gz
229 Extended Passive mode OK (¦¦¦42433¦)
150-Accepted data connection
150 94.6 kbytes to download
100% ¦*******************************************************************¦ 96846 81.28 KB/s 00:00 ETA
226-File successfully transferred
226 0.001 seconds (measured here), 122.83 Mbytes per second
96846 bytes received in 00:01 (80.62 KB/s)
221-Goodbye. You uploaded 0 and downloaded 95 kbytes.
221 Logout.
GOT /private/var/root/.cpan/sources/authors/01mailrc.txt.gz
Going to read /private/var/root/.cpan/sources/authors/01mailrc.txt.gz
Could pipe[/sw/bin/gzip --decompress --stdout /private/var/root/.cpan/sources/authors/01mailrc.txt.gz ¦]: No such file or directory at /System/Library/Perl/CPAN.pm line 4379.
[fred:~] root#
******************************************************************
AFTER THAT, I PERFORMED THE FIRST COMMAND YOU SAID I SHOULD TRY, IN CASE THAT PROVIDED SOME USEFUL FEEDBACK ABOUT THE PROCESS THUS FAR; HERE IS WHAT I GOT:
[fred:~] root# perl -e 'use DBI;'
Can't locate loadable object for module DBI in @INC (@INC contains: /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl /Network/Library/Perl .) at DBI.pm line 255
BEGIN failed--compilation aborted at DBI.pm line 255.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[fred:~] root#
This was the result:
[fred:~] root# perl -e 'use DBD::mysql;'
Can't locate DBD/mysql.pm in @INC (@INC contains: /System/Library/Perl/darwin /System/Library/Perl /Library/Perl/darwin /Library/Perl /Library/Perl /Network/Library/Perl/darwin /Network/Library/Perl /Network/Library/Perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
So, what does this all mean? I'm still at a loss to understand what I must do now to fix this problem.
Anyone have any advice? I can't move forward with setting up my site if I don't fix this!
Unfortunately I have to admit I'm guessing in the dark as far as Perl on OSX is concerned. I do have such a beast here but haven't had the time to get familiar with it.
I'd suggest you find a forum where Perl and Mac people coincide. I found the forums on the Apple site very helpful:
[discussions.info.apple.com...]
under:
Mac OS X and Related Software -> Mac OS X v10.3 Panther
There's a Unix forum there; the participants look pretty knowledgable.
Sorry not to be of any more help.