Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] MySql DBI problems



******    message to minivend-users from pres@NICHEWARE.NET     ******

Hello;

I'm curious if anyone has encountered this problem and if I have traced it down to a "root-cause" or if I'm perhaps barking up the wrong tree.

Here's the situation:
Minivend works great for the stock (text) databases, as well as one custom cart on RH6.2/Apache/IOpenSSL.  Beyond this I have MySql installed and working properly from the command line interface - create databases, add tables, records, queries, all work fine.  MyODBC is installed and works fine for editing or running queries with an Access Database application on my winblows box.  It will not- however, create new tables.  I believe I have traced the problem down to the DBD or DBI perl module.  Running the CPAN install on it yields "already installed," though running a force install from CPAN appears to work but then a test call to use DBD returns an error: 

***************************************************************************************************************
[root@secure /root]# perl -e 'use DBD::mysql; print "I have mySQL\n"' 
Can't load '/usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so' for module DBD::mysql: /usr/local/lib/perl5/site_perl/5.6.0/i686-linux/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[root@secure /root]# 
***************************************************************************************************************

So from here I decide to run the DBD install from source and encountered what looked like a very common problem with no apparent solution, ANYWHERE - errors to follow below ....  I have used up whatever tenacity I have left in searching through the mail archives for MySql, DBI users, and all known search engines to my limited knowledge.  It appears there have been many postings with this exact same problem on this and other platforms - here's the output of the DBD make test;

***************************************************************************************************************
[root@secure mysql]# make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/i686-linux -I/usr/local/lib/perl5/5.6.0 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/00base............install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/00base.t line 38
t/00base............dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-5
         Failed 2/5 tests, 60.00% okay
t/10dsnlist.........defined(@array) is deprecated at t/10dsnlist.t line 49.
         (Maybe you should just omit the defined()?)
install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/10dsnlist.t line 45
t/10dsnlist.........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-3
         Failed 3/3 tests, 0.00% okay
t/20createdrop......install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/20createdrop.t line 47
t/20createdrop......dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-5
         Failed 5/5 tests, 0.00% okay
t/30insertfetch.....install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/30insertfetch.t line 48
t/30insertfetch.....dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-11
         Failed 11/11 tests, 0.00% okay
t/40bindparam.......install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/40bindparam.t line 64
t/40bindparam.......dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-28
         Failed 28/28 tests, 0.00% okay
t/40blobs...........install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/40blobs.t line 68
t/40blobs...........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-11
         Failed 11/11 tests, 0.00% okay
t/40listfields......install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/40listfields.t line 57
t/40listfields......dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-16
         Failed 16/16 tests, 0.00% okay
t/40nulls...........install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/40nulls.t line 50
t/40nulls...........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-11
         Failed 11/11 tests, 0.00% okay
t/40numrows.........install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/40numrows.t line 59
t/40numrows.........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-25
         Failed 25/25 tests, 0.00% okay
t/50chopblanks......install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/50chopblanks.t line 57
t/50chopblanks......dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-35
         Failed 35/35 tests, 0.00% okay
t/50commit..........install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/50commit.t line 64
t/50commit..........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-16
         Failed 16/16 tests, 0.00% okay
t/60leaks...........skipped test on this platform
t/ak-dbd............install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/ak-dbd.t line 59
t/ak-dbd............dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-90
         Failed 90/90 tests, 0.00% okay
t/dbdadmin..........defined(@array) is deprecated at t/dbdadmin.t line 64.
         (Maybe you should just omit the defined()?)
install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: blib/arch/auto/DBD/mysql/mysql.so: undefined symbol: uncompress at /usr/local/lib/perl5/5.6.0/i686-linux/DynaLoader.pm line 200.
  at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
  at t/dbdadmin.t line 60
t/dbdadmin..........dubious                                                  
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-20
         Failed 20/20 tests, 0.00% okay
Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
t/00base.t      255 65280     5    2  40.00%  4-5
t/10dsnlist.t   255 65280     3    3 100.00%  1-3
t/20createdrop. 255 65280     5    5 100.00%  1-5
t/30insertfetch 255 65280    11   11 100.00%  1-11
t/40bindparam.t 255 65280    28   28 100.00%  1-28
t/40blobs.t     255 65280    11   11 100.00%  1-11
t/40listfields. 255 65280    16   16 100.00%  1-16
t/40nulls.t     255 65280    11   11 100.00%  1-11
t/40numrows.t   255 65280    25   25 100.00%  1-25
t/50chopblanks. 255 65280    35   35 100.00%  1-35
t/50commit.t    255 65280    16   16 100.00%  1-16
t/ak-dbd.t      255 65280    90   90 100.00%  1-90
t/dbdadmin.t    255 65280    20   20 100.00%  1-20
1 test skipped.
Failed 13/14 test scripts, 7.14% okay. 273/276 subtests failed, 1.09% okay.
make: *** [test_dynamic] Error 2
***************************************************************************************************************
That same output is all over the place...

 From here I have recompiled perl using gcc instead of cc, tried to reinstall gcc, and seem to have a somewhat broken gcc as a result of all this thrashing.  Basically, all I want is for minivend to drive a database, weather or not I need to create the tables manually (ugh) or not, it doesn't matter.  Right now it says it is using MySql for the mysql cart on startup but it doesn't add the tables like it is supposed to.  The database exists - i.e. defined in catalog.cfg as follows:

***************************************************************************************************************
Variable            SOMESQL      1
Variable            MYSQL        1

#ifndef SOMESQL
Database            area         area.txt          TAB
Database            area         AUTO_NUMBER       1
Database            cat          cat.txt           TAB
Database            country      country.txt       TAB
Database            inventory    inventory.txt     TAB
Database            products     products.txt      TAB
Database            pricing      pricing.txt       TAB
Database            pricing      KEY               sku
Database            pricing      NUMERIC           q2
Database            products     HOT               1
Database            products     INDEX             category:c
Database            shipping     shipping.txt      TAB   
Database            shipping     AUTO_NUMBER       1
Database            orderline    orderline.txt     TAB
Database            transactions transactions.txt  TAB
Database            userdb       userdb.txt        TAB
#endif

#ifdef MYSQL

Variable  SQLDSN   dbi:mysql:golf
Message <<EOF

Using MySQL for databases, DSN=__SQLDSN__.
EOF

# Uncomment if needed
Variable  SQLUSER  validmysqluser
Variable  SQLPASS  validmysqlpass
***************************************************************************************************************
Restarting minvend appears to work normally - the database "golf" exists in mysql, but the time it takes between the line below "Using MySQL for databases, DSN=dbi:mysql:golf"  and "done" is instantaneous.  During this time I understand it should be loading/importing the tables.  I've tried all permutations and combinations of creating new carts with makecat- including making the non-mysql cart and then changing catalog.cfg lines SOMESQL  1 and MYSQL 1 as suggested somewhere.  
Output of a restart below:
***************************************************************************************************************
[root@secure golf]# su -c "/usr/local/minivend/bin/minivend -r" minivend
bash: /root/.bashrc: Permission denied
Killing Minivend server 645 with TERM.
Low traffic settings.
Calling MiniMate....
Minimate is loaded.
MiniVend V4.04a
Configuring catalog ptr...done.
Configuring catalog golf...
Using MySQL for databases, DSN=dbi:mysql:golf.

done.
MiniVend server started in INET and UNIX mode(s) (process id 688)
[root@secure wholesalegolfonline]# 
***************************************************************************************************************
Finally, my sincere apologies for such a lengthy question on a somewhat ancillary topic here - (DBD)  This is my first message to the user group and I feel a bit frustrated that I have to ask for help on this -  usually one can find a solution without further polluting the vastness.

Sincerely,
Thomas Hutton
pres@nicheware.com

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: