in reply to Re^4: Perl XAMPP DB Connect issue (Windows/Strawberry?)
in thread Perl XAMPP DB Connect issue (Windows/Strawberry?)
G'day Polyglot,
Firstly, I'm not a big MSWin user and mostly avoid working with it directly. So, feel free to question anything that follows.
"... downgrading to Windows 11." [my additional emphasis]
To the best of my knowledge, "Windows 11" is the latest MSWin offering. Perhaps a typo, or misunderstanding, with "downgrading".
"Does anyone here have it running natively, sans VM?"
Yes, I do. From cmd.exe:
Microsoft Windows [Version 10.0.19045.2364] (c) Microsoft Corporation. All rights reserved. C:\Users\ken>perlmodver DBI Module: DBI Version: 1.642 Location: C:/Users/ken/local/opt/strawberry_perl/5_026_003/install/per +l/vendor/lib/DBI.pm C:\Users\ken>perlmodver DBD::mysql Module: DBD::mysql Version: 4.049 Location: C:/Users/ken/local/opt/strawberry_perl/5_026_003/install/per +l/vendor/lib/DBD/mysql.pm
perlmodver is a quick-and-dirty script that I set up some years ago. It determines if modules are installed and, if so, their version and location.
C:\Users\ken>where perlmodver C:\Users\ken\local\bin\perlmodver.bat C:\Users\ken>more C:\Users\ken\local\bin\perlmodver.bat @echo off perl -E "my ($err_msg, $missing); BEGIN { $err_msg = q{}; $missing = 0 +; eval { require %1; 1; } or ($err_msg, $missing) = ($@,1); } say q{M +odule: %1}; if ($missing) { say qq{Not installed.\n\@INC:}; say qq{\t +$_} for @INC; say qq{ERROR MESSAGE:\n$err_msg}; } else { say qq{Versi +on: $%1::VERSION\nLocation: $INC{q{%1} =~ s{::}{\/}gr . q{.pm}}}; }"
I would have installed StrawberryPerl v5.26.3 about four years ago; my memory of doing this is now somewhat hazy. I'm 99% certain that I would have installed the DBI and DBD::mysql modules via the cpan utility.
If you're installing via cpan — there are other utilities to do the same, e.g. cpanm & cpanp — ensure that cpan.exe (or equivalent) is in the same bin/ directory as perl.exe.
C:\Users\ken>where perl C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\perl\bin\perl +.exe C:\Users\ken>where cpan C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\perl\bin\cpan +.bat
You will need to install the DBI and DBD::mysql modules with the Perl version you're using. You can't simply copy them from another installation and expect them to work. I suspect this may be (at least part of) the problem you describe in "Re^2: Perl XAMPP DB Connect issue (Windows/Strawberry?)"; although, I am somewhat guessing about that.
— Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Perl XAMPP DB Connect issue (Windows/Strawberry?)
by Polyglot (Chaplain) on Jan 01, 2023 at 13:53 UTC |