I'm trying to do some simple MYSQL stuff on my Windows XP machine. Basically I'm trying to read into the VBulletin MYSQL database with perl.
I downloaded phptriad2-2-1.exe which set everything I needed MYSQL and PHP wise, but also has installed me another copy of apache. Any how... the main thing is I now have VBulleting and a database on my machine.
HOWEVER, when I now try running a perl script, the moment it gets to a "USE DBI;" statement it causes an Internel System Error, and the error log reports:-
Can't locate DBI.pm in @INC (@INC contains: c:/usr/lib c:/usr/site/lib .) at c:/blahblah/db.pl line 3.
This same error message occurs no matter which of the two version of apache I now have.
The interesting thing is I can see in "C:\usr\perl\site\lib" the following stuff:-
A "DBI" directory
DBI-1.32.packlist
DBI.pm
I expect this other directory is from one of my numerous different perl/apache installs over the years?
Anyway, I tried installing DBI by using PPM but always get:-
Error installing package 'DBD-Mysql': Could not local PPD file for package DBD-Mysql.
If I type "search" I get:-
Packages available from "http://ww.activestate.com/Packages/:" and nothing else...
Help...
Re: Cannot install DBI
Hi,
Can't locate DBI.pm in @INC (@INC contains: c:/usr/lib c:/usr/site/lib .)
... I can see in "C:\usr\perl\site\lib" the following stuff
Yep, and that's probably the problem. C:\usr\perl\site\lib is not in INC or - the other way round - your module is not in the directories searched by Perl. I'd try to copy the DBI stuff over to c:/usr/site/lib
Regards,
svenXY
Re^2: Cannot install DBI
I've tried copying the three things (a directory and two files) mentioned to "c:\usr\site\lib" but the error message just changes to...
Can't locate loadable object for module DBI in @INC (@INC contains: c:/usr/lib c:/usr/site/lib .) at c:/usr/site/lib/DBI.pm line 250
Re: Cannot install DBI
A package for DBD-mysql is available at these locations:
http://ppm.ActiveState.com/cgibin/PPM/ppmserver-5.8-windows.pl?urn:/PPMServer
http://theoryx5.uwinnipeg.ca/ppmpackages
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
http://theoryx5.uwinnipeg.ca/ppms
See
A guide to installing modules for Win32 for how to create a repository and general ppm advice.
Re^2: Cannot install DBI
Looking at your link, some of the commands are invalid in my PPM...
For example, if I type "rep", I get "unknown command 'rep'".
Could it be my "PPM" is old/duff? It says (1.0.0) on starting up!?
Re^3: Cannot install DBI
Yes. My ppm (Perl 5.8.0) is version 3.1. What's your version of Perl? It must at least be 5.6 or older.
Re^4: Cannot install DBI
Umm... Dumb question... How can I see what version of perl it is?
What's the easiest way to upgrade it?
Re^5: Cannot install DBI
NeilF,
'How can I see what version of perl it is?'
Type
perl -v from the command line print the version and patch level of your Perl executable, while
perl -V prints a summary of the configuration values and the contents of @INC.
Martin
Re^4: Cannot install DBI
All working now! Thanks for the tip!