MySQL Forums
Forum List  »  Perl

Problems Installing DBD::MySQL offline on IIS
Posted by: Noel Keene
Date: June 06, 2007 10:24AM

Hi,
I'm using windows IIS server, Windows XP, ActivePerl 5.8.8, mySQL 5.0, and I'm not connected to the internet(and may not be able to for a while). I'm running into a lot of problems trying to get started with perl/mysql compatibility. I believe it's because I can't install DBI and/or dbd::mysql. I've searched a lot of forums, posted several questions on other forums, but to no avail yet. I have limited programming knowledge, but have the basics of perl/CGI and know general mySQL commands. I've also purchased several books but none address this specific issue.

Here's my problem. With all of my modules, I've been unzipping them through winzip and placing in my perl/lib folder. Is this the correct way? I see individual folders like perl/lib/dbd and perl/lib/dbi...do I place them in those folders instead of the general perl/lib folder? I've tried both but no go. I see dbi.pm in there and dbd.pm and mysql.pm.
So, I've tried to verify that they're installed through the command line.
Here's what I get:
C:\Perl>ppm

C:\Perl>ppm query dbi
┌──────┬─────────┬─────────────────────────────────────────┬──────┐
│ name │ version │ abstract │ area │
├──────┼─────────┼─────────────────────────────────────────┼──────┤
│ DBI │ 1.52-r1 │ Database independent interface for Perl │ perl │
└──────┴─────────┴─────────────────────────────────────────┴──────┘
(1 package installed matching 'dbi')

C:\Perl>ppm query dbd
┌────────────┬─────────┬──────────────────────────────────────────┬──────┐
│ name │ version │ abstract │ area │
├────────────┼─────────┼──────────────────────────────────────────┼──────┤
│ DBD-SQLite │ 1.13 │ Small fast embedded SQL database engine. │ perl │
└────────────┴─────────┴──────────────────────────────────────────┴──────┘
(1 package installed matching 'dbd')

C:\Perl>ppm query dbd-mysql
*** no packages installed matching 'dbd-mysql' ***

C:\Perl>ppm query dbd::mysql
*** no packages installed matching 'dbd::mysql' ***

Hopefully I'm trying the right thing. According to this it seems like I have DBI but not dbd-mysql...instead it shows dbd-sqlite?? Is this what I need?

Next, I tried to create a simple perl script to verify that DBI/DBD-mysql was installed. Here's the results, which seem to indicate that DBI is not installed, even though the query above shows it is.

#!/perl/bin/perl -w
# mysqlscriptDBItest.pl - is DBI okay?
use DBI;
use strict;



my @drivers=DBI->available_drivers();
print join("n", @drivers);
print "n";


C:\>cd perl-scripts

C:\perl-scripts>mysqlscriptDBItest.pl
Can't locate object method "available_drivers" via package "DBI" (perhaps you fo
rgot to load "DBI"?) at C:\perl-scripts\mysqlscriptDBItest.pl line 11.

Finally, I try to install the dbd::mysql driver via perl makefile.pl, and I get the following error:

C:\TEMP>perl makefile.pl
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help

Given my limited C background, I don't really know where to go from here. So I tried one other thing...since I've heard one needs to have DBI installed before DBD::mysql, so in case DBI wasn't installed correctly, I tried the perl makefile.pl for DBI, and I received the following error:
It says I have a visual compiler whose LIB and INCLUDE environment variables are not set. It suggests I run VCVARS32.BAT that came with compiler in order to run it. It suggests directories where to find the vcvars32 but I can't find it there.

So, I know this was long and I'm not completely knowledgeable on all this, but do you have any ideas how I can successfully install these modules/drivers so I can begin to communicate with mysql through Perl/CGI? Thanks very much!!!

Shad

Options: ReplyQuote


Subject
Written By
Posted
Problems Installing DBD::MySQL offline on IIS
June 06, 2007 10:24AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.