Can't install perl-DBD-MySQL

2010-08-26 Thread Nunzio Daveri
Hello gurus, I am trying to install the perl-DBD-MySQL and each time I get this 
error message.  Any ideas?  I have tried it on a Sun X4150 (Dual Quad Cored 
Intel) and a Sun X4200 (Dual Dual Core Opteron) both on CentOS 4.8.  I have 
tried to install and build with MySQL 4.x on the box and then removed it and 
installed 5.x but both times I get the same error message :-(

Anyone have any ideas why it constantly dies and how to fix it please?  I can't 
even locate what is is complaining about, I think it's v14 of 
libmysqlclient.so???

Thanks in advance :-)

Nunzio

[root]# rpm -i ./perl-DBD-MySQL-2.9004-3.1.centos4.i386.rpm
error: Failed dependencies:
libmysqlclient.so.14 is needed by perl-DBD-MySQL-2.9004-3.1.centos4.i386
Suggested resolutions:

/home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/mysql-4.1.22-2.el4.i386.rpm
[root]# updatedb
[root]# locate libmysqlclient.so.14
[root]# locate libmysqlclient.so
/usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so.16.0.0

/usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so

/usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so.16

/usr/lib/mysql/libmysqlclient.so.10.0.0
/usr/lib/mysql/libmysqlclient.so.10
/home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so
/home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so.16.0.0
/home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so.16
/mysql_5.1/lib/libmysqlclient.so
/mysql_5.1/lib/libmysqlclient.so.16.0.0
/mysql_5.1/lib/libmysqlclient.so.16



  

Re: Can't install perl-DBD-MySQL

2010-08-26 Thread Joerg Bruehe
Nunzio,


Nunzio Daveri wrote:
 Hello gurus, I am trying to install the perl-DBD-MySQL and each time I get 
 this 
 error message.  Any ideas?  I have tried it on a Sun X4150 (Dual Quad Cored 
 Intel) and a Sun X4200 (Dual Dual Core Opteron) both on CentOS 4.8.  I have 
 tried to install and build with MySQL 4.x on the box and then removed it and 
 installed 5.x but both times I get the same error message :-(
 
 Anyone have any ideas why it constantly dies and how to fix it please?  I 
 can't 
 even locate what is is complaining about, I think it's v14 of 
 libmysqlclient.so???

Of course.

Perl-DBD-MySQL was built against an older version of MySQL, from the
message you can tell it was MySQL 4.1.22, so you need that version of
the shared client library.
(Strictly speaking, you don't need 4.1.22 specifically, any version that
uses the same ABI will do, which should be any 4.1 version; they all are
version 14 of the library interface.)
(You even have version 10 of the library installed, which is really old
by now.)

With the RPMs built and published by the MySQL team, you will get that
in the shared-compat RPM that corresponds to your platform.

Until now, shared-compat will conflict with shared, as it also
contains the current version of the shared client library. So you need
to uninstall shared and install shared-compat.

We intend to change that, probably with the upcoming version 5.5.6:
From then onward, you can (un)install a shared-compat RPM without
affecting the shared RPM, as then the shared-compat will contain
only the previous versions of the client library and not the current one.

If you don't want to install MySQL from RPMs, you can still take a
shared-compat RPM and use rpm2cpio to extract libmysqlclient.so.14
from it. You could do the same with a 4.1 package, but I think they are
removed from the archive by now as they are really outdated.

An alternative would be to get a newer Perl-DBD-MySQL package that was
built using a more current version of MySQL, or to build that from
source using the current MySQL.


The choice is yours,
Jörg


Original quote left on intention, for those who want to check the message:

 
 [root]# rpm -i ./perl-DBD-MySQL-2.9004-3.1.centos4.i386.rpm
 error: Failed dependencies:
 libmysqlclient.so.14 is needed by 
 perl-DBD-MySQL-2.9004-3.1.centos4.i386
 Suggested resolutions:
 
 /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/mysql-4.1.22-2.el4.i386.rpm
 [root]# updatedb
 [root]# locate libmysqlclient.so.14
 [root]# locate libmysqlclient.so
 /usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so.16.0.0
 
 /usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so
 
 /usr/src/redhat/BUILD/mysql-5.1.44/mysql-debug-5.1.44/libmysql/.libs/libmysqlclient.so.16
 
 /usr/lib/mysql/libmysqlclient.so.10.0.0
 /usr/lib/mysql/libmysqlclient.so.10
 /home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so
 /home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so.16.0.0
 /home/nunzio/mysql-5.1.44-linux-i686-glibc23/lib/libmysqlclient.so.16
 /mysql_5.1/lib/libmysqlclient.so
 /mysql_5.1/lib/libmysqlclient.so.16.0.0
 /mysql_5.1/lib/libmysqlclient.so.16
 
 
 
 


-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@oracle.com
   (+49 30) 417 01 487
ORACLE Deutschland B.V.  Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



RE: Problem installing PERL DBD::mysql

2006-08-15 Thread Martin J. Evans
You are linking against the static compress library which is intended for
static linking not inclusion into a dynamic object. I would not rebuild
libz.a with fPIC. You should be linking against libz.so which I'd guess you
haven't got. Check you've got a libz.so and then make sure DBD::mysql picks it
up. mysql_config on my machine for instance produces:

bash-2.05$ mysql_config 
Usage: /usr/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/mysql/include/mysql]
--include[-I/usr/mysql/include/mysql]
--libs   [-L/usr/mysql/lib/mysql -lmysqlclient -lz -lcrypt
-lnsl -lm]
--libs_r [-L/usr/mysql/lib/mysql -lmysqlclient_r -lz -lpthread
-lcrypt -lnsl -lm -lpthread]
--socket [/tmp/mysql.sock]
--port   [3306]
--version[5.0.15]
--libmysqld-libs [-L/usr/mysql/lib/mysql -lmysqld -lz -lpthread -lcrypt
-lnsl -lm -lpthread -lrt]

NOTE the -lz

and I have 

/usr/lib/libz.a
/usr/lib/libz.so
/usr/lib/libz.so.1
/usr/lib/libz.so.1.2.3

so it finds the dynamic library /usr/lib/libz.so.

Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com
 
On 14-Aug-2006 Logg, Connie A. wrote:
 Machine info:
 
 [EMAIL PROTECTED] utils]$ uname -a
 Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 x86_64
 x86_64 x86_64 GNU/Linux
 [EMAIL PROTECTED] utils]$ perl -v
 This is perl, v5.8.8 built for x86_64-linux
 [EMAIL PROTECTED] utils]$ more /etc/redhat-release
 Red Hat Enterprise Linux WS release 4 (Nahant Update 4)
 
 
 --
 I am having a hard time installing DBD:mysql on 64 bit machine
 snv1.ultralight.org 
 
 /usr/bin/perl MCPAN -e shell
 CPAN install DBD::mysql
 
 Dies with errors...so I decided to do it from the source, and it also
 complainshere is the output from the source install:
 
 [EMAIL PROTECTED] DBD-mysql-3.0006]# /usr/bin/perl Makefile.PL I will use the
 following settings for compiling and testing:
 
   cflags(mysql_config) = -I/usr/local/include/mysql
   embedded  (mysql_config) =
   libs  (mysql_config) = -L/usr/local/lib/mysql -lmysqlclient -lz
 -lcrypt -lnsl -lm
   mysql_config  (guessed ) = mysql_config
   nocatchstderr (default ) = 0
   nofoundrows   (default ) = 0
   ssl   (guessed ) = 0
   testdb(default ) = test
   testhost  (default ) =
   testpassword  (default ) =
   testsocket(default ) =
   testuser  (default ) =
 
 To change these settings, see 'perl Makefile.PL --help' and 'perldoc
 INSTALL'.
 
 Using DBI 1.52 (for perl 5.008008 on x86_64-linux) installed in
 /usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI/
 Writing Makefile for DBD::mysql
 [EMAIL PROTECTED] DBD-mysql-3.0006]#
 [EMAIL PROTECTED] DBD-mysql-3.0006]# make
 cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI
 -I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g 
 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSE
 T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\
 -DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64
 -linux/CORE   dbdimp.c
 cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI
 -I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g 
 -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSE
 T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\
 -DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64
 -linux/CORE   mysql.c
 mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
 mysql.xs:647: warning: ignoring return value of `Perl_newSViv', declared with
 attribute warn_unused_result
 mysql.xs:650: warning: ignoring return value of `Perl_newSViv', declared with
 attribute warn_unused_result
 mysql.xs:653: warning: ignoring return value of `Perl_newSVpv', declared with
 attribute warn_unused_result Running Mkbootstrap for DBD::mysql () chmod 644
 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so
 LD_RUN_PATH=/usr/local/lib/mysql /usr/bin/perl myld cc  -shared
 -L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/aut
 o/DBD/mysql/mysql.so\
-L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   \
 
 /usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32
 against `a local symbol' can not be used when making a shared object;
 recompile with -fPIC
 /usr/local/lib/libz.a: could not read symbols: Bad value
 collect2: ld returned 1 exit status
 make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
 
 I have tried using -fPIC, but I think I do not know how to tell it to use
 that correctly. I assume it is passed with --cflags on the 'perl Makefile.PL'
 line, but I can't get that to work.
 
 Can someone tell me the syntax on the 'perl Makefile.PL' line, or, what the
 problem is and how can I get DBD::mysql to load?
 
 By the way, perl Makefile.PL --help gives

Problem installing PERL DBD::mysql

2006-08-14 Thread Logg, Connie A.
Machine info:

[EMAIL PROTECTED] utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 x86_64 x86_64 
x86_64 GNU/Linux
[EMAIL PROTECTED] utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[EMAIL PROTECTED] utils]$ more /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant Update 4)


--
I am having a hard time installing DBD:mysql on 64 bit machine 
snv1.ultralight.org 

/usr/bin/perl MCPAN -e shell
CPAN install DBD::mysql

Dies with errors...so I decided to do it from the source, and it also 
complainshere is the output from the source install:

[EMAIL PROTECTED] DBD-mysql-3.0006]# /usr/bin/perl Makefile.PL I will use the 
following settings for compiling and testing:

  cflags(mysql_config) = -I/usr/local/include/mysql
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/local/lib/mysql -lmysqlclient -lz 
-lcrypt -lnsl -lm
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 0
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
  testuser  (default ) =

To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'.

Using DBI 1.52 (for perl 5.008008 on x86_64-linux) installed in 
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI/
Writing Makefile for DBD::mysql
[EMAIL PROTECTED] DBD-mysql-3.0006]#
[EMAIL PROTECTED] DBD-mysql-3.0006]# make
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ 
-DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE   dbdimp.c
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ 
-DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE   mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:647: warning: ignoring return value of `Perl_newSViv', declared with 
attribute warn_unused_result
mysql.xs:650: warning: ignoring return value of `Perl_newSViv', declared with 
attribute warn_unused_result
mysql.xs:653: warning: ignoring return value of `Perl_newSVpv', declared with 
attribute warn_unused_result Running Mkbootstrap for DBD::mysql () chmod 644 
mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.so 
LD_RUN_PATH=/usr/local/lib/mysql /usr/bin/perl myld cc  -shared 
-L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/aut
o/DBD/mysql/mysql.so\
   -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   \

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against 
`a local symbol' can not be used when making a shared object; recompile with 
-fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

I have tried using -fPIC, but I think I do not know how to tell it to use that 
correctly. I assume it is passed with --cflags on the 'perl Makefile.PL' line, 
but I can't get that to work.

Can someone tell me the syntax on the 'perl Makefile.PL' line, or, what the 
problem is and how can I get DBD::mysql to load?

By the way, perl Makefile.PL --help gives me..
[EMAIL PROTECTED] DBD-mysql-3.0006]# perl -Makefile.PL --help

Usage: perl [switches] [--] [programfile] [arguments]
  -0[octal]   specify record separator (\0, if no argument)
  -a  autosplit mode with -n or -p (splits $_ into @F)
  -C[number/list] enables the listed Unicode features
  -c  check syntax only (runs BEGIN and CHECK blocks)
  -d[:debugger]   run program under debugger
  -D[number/list] set debugging flags (argument is a bit mask or alphabets)
  -e program  one line of program (several -e's allowed, omit programfile)
  -f  don't do $sitelib/sitecustomize.pl at startup
  -F/pattern/ split() pattern for -a switch (//'s are optional)
  -i[extension]   edit  files in place (makes backup if extension supplied)
  -Idirectory specify @INC/#include directory (several -I's allowed)
  -l[octal]   enable line ending processing, specifies line terminator
  -[mM][-]module  execute use/no module... before executing program
  -n  assume while () { ... } loop around program
  -p  assume loop like -n but print line also, like sed
  -P  run program through C preprocessor before compilation
  -s  enable rudimentary parsing for switches after programfile

Re: Problem installing PERL DBD::mysql

2006-08-14 Thread Niels Larsen

Connie,

I had the same error with another program recently, but probably the
fix for yours is the same: try compile zlib with -fPIC by adding
 -fPIC to CFLAGS in the Makefile.

Niels Larsen



Logg, Connie A. wrote:

Machine info:

[EMAIL PROTECTED] utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 x86_64 x86_64 
x86_64 GNU/Linux
[EMAIL PROTECTED] utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[EMAIL PROTECTED] utils]$ more /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant Update 4)


--
I am having a hard time installing DBD:mysql on 64 bit machine snv1.ultralight.org 


/usr/bin/perl MCPAN -e shell
CPAN install DBD::mysql

Dies with errors...so I decided to do it from the source, and it also 
complainshere is the output from the source install:

[EMAIL PROTECTED] DBD-mysql-3.0006]# /usr/bin/perl Makefile.PL I will use the 
following settings for compiling and testing:

  cflags(mysql_config) = -I/usr/local/include/mysql
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/local/lib/mysql -lmysqlclient -lz 
-lcrypt -lnsl -lm
  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 0
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
  testuser  (default ) =

To change these settings, see 'perl Makefile.PL --help' and 'perldoc INSTALL'.

Using DBI 1.52 (for perl 5.008008 on x86_64-linux) installed in 
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI/
Writing Makefile for DBD::mysql
[EMAIL PROTECTED] DBD-mysql-3.0006]#
[EMAIL PROTECTED] DBD-mysql-3.0006]# make
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ -DXS_VERSION=\3.0006\ 
-fpic -I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE   dbdimp.c
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ -DXS_VERSION=\3.0006\ 
-fpic -I/usr/lib/perl5/5.8.8/x86_64
-linux/CORE   mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:647: warning: ignoring return value of `Perl_newSViv', declared with 
attribute warn_unused_result
mysql.xs:650: warning: ignoring return value of `Perl_newSViv', declared with 
attribute warn_unused_result
mysql.xs:653: warning: ignoring return value of `Perl_newSVpv', declared with attribute 
warn_unused_result Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f 
blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH=/usr/local/lib/mysql 
/usr/bin/perl myld cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o blib/arch/aut
o/DBD/mysql/mysql.so\
   -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   \

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against 
`a local symbol' can not be used when making a shared object; recompile with 
-fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

I have tried using -fPIC, but I think I do not know how to tell it to use that 
correctly. I assume it is passed with --cflags on the 'perl Makefile.PL' line, 
but I can't get that to work.

Can someone tell me the syntax on the 'perl Makefile.PL' line, or, what the 
problem is and how can I get DBD::mysql to load?

By the way, perl Makefile.PL --help gives me..
[EMAIL PROTECTED] DBD-mysql-3.0006]# perl -Makefile.PL --help

Usage: perl [switches] [--] [programfile] [arguments]
  -0[octal]   specify record separator (\0, if no argument)
  -a  autosplit mode with -n or -p (splits $_ into @F)
  -C[number/list] enables the listed Unicode features
  -c  check syntax only (runs BEGIN and CHECK blocks)
  -d[:debugger]   run program under debugger
  -D[number/list] set debugging flags (argument is a bit mask or alphabets)
  -e program  one line of program (several -e's allowed, omit programfile)
  -f  don't do $sitelib/sitecustomize.pl at startup
  -F/pattern/ split() pattern for -a switch (//'s are optional)
  -i[extension]   edit  files in place (makes backup if extension supplied)
  -Idirectory specify @INC/#include directory (several -I's allowed)
  -l[octal]   enable line ending processing, specifies line terminator
  -[mM][-]module  execute use/no module... before executing program
  -n  assume while () { ... } loop around program

Re: Problem installing PERL DBD::mysql

2006-08-14 Thread Patrick Galbraith

Niels Larsen wrote:

Niels,

Do you mean in the Makefile for zlib?

Thanks!

Patrick


Connie,

I had the same error with another program recently, but probably the
fix for yours is the same: try compile zlib with -fPIC by adding
 -fPIC to CFLAGS in the Makefile.

Niels Larsen



Logg, Connie A. wrote:


Machine info:

[EMAIL PROTECTED] utils]$ uname -a
Linux snv1 2.6.9-34.0.2.ELsmp #1 SMP Fri Jun 30 10:32:04 EDT 2006 
x86_64 x86_64 x86_64 GNU/Linux

[EMAIL PROTECTED] utils]$ perl -v
This is perl, v5.8.8 built for x86_64-linux
[EMAIL PROTECTED] utils]$ more /etc/redhat-release
Red Hat Enterprise Linux WS release 4 (Nahant Update 4)


--
I am having a hard time installing DBD:mysql on 64 bit machine 
snv1.ultralight.org

/usr/bin/perl MCPAN -e shell
CPAN install DBD::mysql

Dies with errors...so I decided to do it from the source, and it also 
complainshere is the output from the source install:


[EMAIL PROTECTED] DBD-mysql-3.0006]# /usr/bin/perl Makefile.PL I will use 
the following settings for compiling and testing:


  cflags(mysql_config) = -I/usr/local/include/mysql
  embedded  (mysql_config) =
  libs  (mysql_config) = -L/usr/local/lib/mysql -lmysqlclient 
-lz -lcrypt -lnsl -lm

  mysql_config  (guessed ) = mysql_config
  nocatchstderr (default ) = 0
  nofoundrows   (default ) = 0
  ssl   (guessed ) = 0
  testdb(default ) = test
  testhost  (default ) =
  testpassword  (default ) =
  testsocket(default ) =
  testuser  (default ) =

To change these settings, see 'perl Makefile.PL --help' and 'perldoc 
INSTALL'.


Using DBI 1.52 (for perl 5.008008 on x86_64-linux) installed in 
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI/

Writing Makefile for DBD::mysql
[EMAIL PROTECTED] DBD-mysql-3.0006]#
[EMAIL PROTECTED] DBD-mysql-3.0006]# make
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ 
-DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64

-linux/CORE   dbdimp.c
cc -c  -I/usr/lib/perl5/site_perl/5.8.8/x86_64-linux/auto/DBI 
-I/usr/local/include/mysql -DDBD_MYSQL_INSERT_ID_IS_GOO D -g  
-fno-strict-aliasing -pipe -Wdeclaration-after-statement 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSE
T_BITS=64 -I/usr/include/gdbm -O2   -DVERSION=\3.0006\ 
-DXS_VERSION=\3.0006\ -fpic -I/usr/lib/perl5/5.8.8/x86_64

-linux/CORE   mysql.c
mysql.xs: In function `XS_DBD__mysql__GetInfo_dbd_mysql_get_info':
mysql.xs:647: warning: ignoring return value of `Perl_newSViv', 
declared with attribute warn_unused_result
mysql.xs:650: warning: ignoring return value of `Perl_newSViv', 
declared with attribute warn_unused_result
mysql.xs:653: warning: ignoring return value of `Perl_newSVpv', 
declared with attribute warn_unused_result Running Mkbootstrap for 
DBD::mysql () chmod 644 mysql.bs rm -f 
blib/arch/auto/DBD/mysql/mysql.so LD_RUN_PATH=/usr/local/lib/mysql 
/usr/bin/perl myld cc  -shared -L/usr/local/lib dbdimp.o mysql.o  -o 
blib/arch/aut

o/DBD/mysql/mysql.so\
   -L/usr/local/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   \

/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation 
R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC

/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1

I have tried using -fPIC, but I think I do not know how to tell it to 
use that correctly. I assume it is passed with --cflags on the 'perl 
Makefile.PL' line, but I can't get that to work.


Can someone tell me the syntax on the 'perl Makefile.PL' line, or, 
what the problem is and how can I get DBD::mysql to load?


By the way, perl Makefile.PL --help gives me..
[EMAIL PROTECTED] DBD-mysql-3.0006]# perl -Makefile.PL --help

Usage: perl [switches] [--] [programfile] [arguments]
  -0[octal]   specify record separator (\0, if no argument)
  -a  autosplit mode with -n or -p (splits $_ into @F)
  -C[number/list] enables the listed Unicode features
  -c  check syntax only (runs BEGIN and CHECK blocks)
  -d[:debugger]   run program under debugger
  -D[number/list] set debugging flags (argument is a bit mask or 
alphabets)
  -e program  one line of program (several -e's allowed, omit 
programfile)

  -f  don't do $sitelib/sitecustomize.pl at startup
  -F/pattern/ split() pattern for -a switch (//'s are optional)
  -i[extension]   edit  files in place (makes backup if extension 
supplied)

  -Idirectory specify @INC/#include directory (several -I's allowed)
  -l[octal]   enable line ending processing, specifies line 
terminator

  -[mM][-]module

Re: Problem installing PERL DBD::mysql

2006-08-14 Thread Niels Larsen

Yes .. and had to add it to jpeg-6b (on x86_64) to make that
work too.

Patrick Galbraith wrote:

Niels Larsen wrote:

Niels,

Do you mean in the Makefile for zlib?

Thanks!

Patrick


Connie,

I had the same error with another program recently, but probably the
fix for yours is the same: try compile zlib with -fPIC by adding
 -fPIC to CFLAGS in the Makefile.

Niels Larsen


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysqlhotcopy / Perl / DBD::mysql on RHEL 4 x86_64

2006-06-20 Thread Tim Lucia
Solved -- 

After upgrading to 5.0.22, DBD::mysql builds without any problems. 

-Original Message-
From: Tim Lucia [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 4:17 PM
To: mysql@lists.mysql.com
Subject: Mysqlhotcopy / Perl / DBD::mysql on RHEL 4 x86_64

I'm running on a Xeon 3.8 under RHEL V.4.  I wanted to try out mysqlhotcopy,
but it says I need DBD::mysql.  Cpan gets it for me, but make DBD::mysql
dies with the below error.  I am using 5.0.18 standard
(MySQL-server-standard-5.0.18-0.rhel4).  Attempting to install
perl-dbd-mysql off the RPMS directory on the RHEL V.4 installation media
complains about a missing client library and points me off to a 4.1 rpm,
which I do not want.

Anyone have this same problem?  Or clues how to fix this?

Thanks,
Tim

Here's the error:

gcc -c
-I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI
-I/usr/include/mysql -g -pipe -march=i386  -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -g -pipe -m64   -DVERSION=\3.0006\
-DXS_VERSION=\3.0006\ -fPIC
-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE   dbdimp.c
dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
make: *** [dbdimp.o] Error 1
 

-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 3:55 PM
To: Robinson, Eric
Cc: mysql@lists.mysql.com
Subject: Re: Server Load Question

Eric, I sent you a note about hardware this morning as well, but here's a
further thought -

Don't know if this is the case, but is this the exact same application
served to 100 different customers?  And are Database-2 and Database-3 the
same for every customer?  Some kind of reference info perhaps?  If so, split
those off into a single reference database and share it across all your
customers - you'll have an easier time managing MySQL, and you should gain
something in performance due to MySQL being able to effectively cache some
of the info.

Maybe that's not what you've got but thought I'd mention it in case.

Dan


Robinson, Eric wrote:
 I asked this question previously but didn't get much response so I'll 
 try again.
 
 Our server will be home to 100 separate clients. Each client will have 
 their own set of databases that will be accessed by 10-60 users at 
 each client's site.
 
 Each client has 3 databases.
 
 Database-1: 500 tables. 13 tables sized 10-100MB. Remaining tables all 
 less that 10MB. (This is the only database that is updated. The others 
 are just for reference.) Main table grows at a rate of a few hundred 
 MB/year.
 
 Database-2: 50 tables. 3 tables sized 10-100MB. All other tables less 
 than 10MB. No data growth.
 
 Database-3: 179 tables. 10 tables sized 1-15MB. All other tables less 
 than 1MB. No data growth.
 
 So...
 
 Total databses: 300
 Total tables: 72,900
 
 Q: In terms of performance, is it better for each customer to have its 
 own instance of MySQL, each serving 3 databases, or is it better to 
 have one instance of MySQL serving 300 databases?
 
 --Eric
 
 
 
 
 
 Disclaimer - June 19, 2006
 This email and any files transmitted with it are confidential and 
 intended
solely for [EMAIL PROTECTED] If you are not the named addressee you
should not disseminate, distribute, copy or alter this email. Any views or
opinions presented in this email are solely those of the author and might
not represent those of Physician Select Management (PSM) or Physician's
Managed Care (PMC). Warning: Although the message sender has taken
reasonable precautions to ensure no viruses are present in this email,
neither PSM nor PMC can accept responsibility for any loss or damage arising
from the use of this email or attachments.
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Mysqlhotcopy / Perl / DBD::mysql on RHEL 4 x86_64

2006-06-19 Thread Tim Lucia
I'm running on a Xeon 3.8 under RHEL V.4.  I wanted to try out mysqlhotcopy,
but it says I need DBD::mysql.  Cpan gets it for me, but make DBD::mysql
dies with the below error.  I am using 5.0.18 standard
(MySQL-server-standard-5.0.18-0.rhel4).  Attempting to install
perl-dbd-mysql off the RPMS directory on the RHEL V.4 installation media
complains about a missing client library and points me off to a 4.1 rpm,
which I do not want.

Anyone have this same problem?  Or clues how to fix this?

Thanks,
Tim

Here's the error:

gcc -c
-I/usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/auto/DBI
-I/usr/include/mysql -g -pipe -march=i386  -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -O2 -g -pipe -m64   -DVERSION=\3.0006\
-DXS_VERSION=\3.0006\ -fPIC
-I/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/CORE   dbdimp.c
dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
make: *** [dbdimp.o] Error 1
 

-Original Message-
From: Dan Buettner [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 19, 2006 3:55 PM
To: Robinson, Eric
Cc: mysql@lists.mysql.com
Subject: Re: Server Load Question

Eric, I sent you a note about hardware this morning as well, but here's a
further thought -

Don't know if this is the case, but is this the exact same application
served to 100 different customers?  And are Database-2 and Database-3 the
same for every customer?  Some kind of reference info perhaps?  If so, split
those off into a single reference database and share it across all your
customers - you'll have an easier time managing MySQL, and you should gain
something in performance due to MySQL being able to effectively cache some
of the info.

Maybe that's not what you've got but thought I'd mention it in case.

Dan


Robinson, Eric wrote:
 I asked this question previously but didn't get much response so I'll 
 try again.
 
 Our server will be home to 100 separate clients. Each client will have 
 their own set of databases that will be accessed by 10-60 users at 
 each client's site.
 
 Each client has 3 databases.
 
 Database-1: 500 tables. 13 tables sized 10-100MB. Remaining tables all 
 less that 10MB. (This is the only database that is updated. The others 
 are just for reference.) Main table grows at a rate of a few hundred 
 MB/year.
 
 Database-2: 50 tables. 3 tables sized 10-100MB. All other tables less 
 than 10MB. No data growth.
 
 Database-3: 179 tables. 10 tables sized 1-15MB. All other tables less 
 than 1MB. No data growth.
 
 So...
 
 Total databses: 300
 Total tables: 72,900
 
 Q: In terms of performance, is it better for each customer to have its 
 own instance of MySQL, each serving 3 databases, or is it better to 
 have one instance of MySQL serving 300 databases?
 
 --Eric
 
 
 
 
 
 Disclaimer - June 19, 2006
 This email and any files transmitted with it are confidential and intended
solely for [EMAIL PROTECTED] If you are not the named addressee you
should not disseminate, distribute, copy or alter this email. Any views or
opinions presented in this email are solely those of the author and might
not represent those of Physician Select Management (PSM) or Physician's
Managed Care (PMC). Warning: Although the message sender has taken
reasonable precautions to ensure no viruses are present in this email,
neither PSM nor PMC can accept responsibility for any loss or damage arising
from the use of this email or attachments.
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



free graphing tool for perl and mysql

2005-01-10 Thread N. Kavithashree
hello,
thank you for info.
but i want one graphics tool which is free.
i m using perl and mysql.
i am also searching for the graphics tool which i can use for the data in
mysql table or the output by my perl program.
if anyoneknow abt this please do reply

Kavitha
===
-- Forwarded message --
Date: Tue, 11 Jan 2005 11:44:34 +1100
From: Daniel Kasak [EMAIL PROTECTED]
To: [EMAIL PROTECTED], mysql@lists.mysql.com
Subject: Re: Generic graphing tool?
Jason Martin wrote:
Does anyone know of a web-based tool that will let you graph
arbitrary data out of of MySQL? I'm thinking of something that
lets you define a select statement, some graph options and
produce a graph.

JPGraph produces some *very* nice graphs from PHP.
There are some graphing modules around for Perl, but I don't think
there's anything as nice as JPGraph. If there is, I'd like to know about
it :)
--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
-- 

MySQL General Mailing List

For list archives: http://lists.mysql.com/mysql

To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Perl with MySQL

2004-09-13 Thread Egor Egorov

Just go to http://dbi.perl.org/

You will need to download DBI and DBD::Mysql. Then you could install it manually, 
even no need to run the CPAN shell. 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl with MySQL

2004-09-10 Thread gerald_clark
This is the 3rd time you have asked this.
Perhaps you should take it to a perl list where it belongs.
Kirti S. Bajwa wrote:
Hello:
I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:
% echo $PATH
% perl -MCPAN -e shell
Note: Answer no to auto-configure perl.
cpan install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit
Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command cpan install Data::Dumper;, a
message was displayed indicating that there is a new version of perl  it
canbe installed by using the command cpan install Bundle::CPAN. Well, I
changed the commands to as follows:
% echo $PATH
% perl -MCPAN -e shell
Note: Answer no to auto-configure perl.
cpan install Data::Dumper
cpan install Bundle::CPAN   
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit
I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.
Kirti
PS: I have no idea id I posted this or not. So if it is duplicate, please
ignore.
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Perl with MySQL

2004-09-09 Thread Kirti S. Bajwa
Hello:

I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:


% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit

Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command cpan install Data::Dumper;, a
message was displayed indicating that there is a new version of perl  it
canbe installed by using the command cpan install Bundle::CPAN. Well, I
changed the commands to as follows:

% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan install Data::Dumper
cpan install Bundle::CPAN  
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit

I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.

Kirti

PS: I have no idea id I posted this or not. So if it is duplicate, please
ignore.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Perl with MySQL

2004-09-08 Thread Kirti S. Bajwa
Hello:

I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:


% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit

Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command cpan install Data::Dumper;, a
message was displayed indicating that there is a new version of perl  it
canbe installed by using the command cpan install Bundle::CPAN. Well, I
changed the commands to as follows:

% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan install Data::Dumper
cpan install Bundle::CPAN  
cpan install Bundle::DBI
cpan install Bundle::DBD::mysql
cpan quit

I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.

Kirti

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Data dump using perl with mysql won't update

2004-05-05 Thread smrtalec
before I begin sorry for the cross post but i'm desperate
The routine in question is below. It's pretty straight forward its a series of loops 
which basically matches the row then dumps data stored in hash ref into the DB. for 
some reason the script runs with no errors (ran with strict)  I can verify that the 
data is being iterated, but when I check the Db no data is updated, the int fields 
have been updated to 0 as opposed to NULL. is anyone seeing somethign I'm not.




sub write_db_2 {
my ($ar_info,$table) = @_;
my ($dbh,$sth,$k,$rh_row);
$dbh = connect_try(rowan,5340brig);
foreach $k (keys (%{$ar_info-[1]})){
if ($table eq prop_info){
$sth = $dbh-prepare (UPDATE prop_info
   SET $k = ?
   WHERE prop_str_addr = ?;) or
   err_trap(failed to prepare statement\n);
}elsif ($table eq own_info){
$sth = $dbh-prepare (UPDATE own_info
   SET $k = ?
   WHERE own_str_addr = ?;) or
   err_trap(failed to prepare statement\n);


}
foreach $rh_row (@$ar_info) {
print ::$k=$rh_row-{$k};
$sth-bind_param (1,$rh_row-{$k});
if ($table eq prop_str_addr) {
$sth-bind_param (2,$rh_row-{prop_str_addr});
}elsif  ($table eq own_str_addr) {
$sth-bind_param (2,$rh_row-{own_str_addr});
}
$sth-execute() or
err_trap(failed to execute statement\n);

}
print \n===\n;

}
$sth-finish();
$dbh-disconnect or
err_trap(failed to disconnect statement\n);
}


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Data dump using perl with mysql won't update

2004-05-05 Thread Paul DuBois
At 15:02 -0700 5/5/04, [EMAIL PROTECTED] wrote:
before I begin sorry for the cross post but i'm desperate
The routine in question is below. It's pretty straight forward its a 
series of loops which basically matches the row then dumps data 
stored in hash ref into the DB. for some reason the script runs with 
no errors (ran with strict)  I can verify that the data is being 
iterated, but when I check the Db no data is updated, the int fields 
have been updated to 0 as opposed to NULL. is anyone seeing 
somethign I'm not.
If you want them set to NULL using DBI, you have to bind undef to the
proper parameter.  Is that what you're doing, or are you binding
something else, such as 0 or the empty string?
Have you tried turning on DBI's trace facility to see what's happening?

P.S., you don't need the semicolons at the ends of the query strings.
That's a mysql client thing, but you're not using mysql.

sub write_db_2 {
my ($ar_info,$table) = @_;
my ($dbh,$sth,$k,$rh_row);
$dbh = connect_try(rowan,5340brig);
foreach $k (keys (%{$ar_info-[1]})){
if ($table eq prop_info){
$sth = $dbh-prepare (UPDATE prop_info
   SET $k = ?
   WHERE prop_str_addr = ?;) or
   err_trap(failed to prepare 
statement\n);
}elsif ($table eq own_info){
$sth = $dbh-prepare (UPDATE own_info
   SET $k = ?
   WHERE own_str_addr = ?;) or
   err_trap(failed to prepare 
statement\n);

}
foreach $rh_row (@$ar_info) {
print ::$k=$rh_row-{$k};
$sth-bind_param (1,$rh_row-{$k});
if ($table eq prop_str_addr) {
$sth-bind_param (2,$rh_row-{prop_str_addr});
}elsif  ($table eq own_str_addr) {
$sth-bind_param (2,$rh_row-{own_str_addr});
}
$sth-execute() or
err_trap(failed to execute statement\n);
}
print \n===\n;
}
$sth-finish();
$dbh-disconnect or
err_trap(failed to disconnect statement\n);
}


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Data dump using perl with mysql won't update

2004-05-05 Thread smrtalec

 If you want them set to NULL using DBI, you have to bind undef to the
 proper parameter.  Is that what you're doing, or are you binding
 something else, such as 0 or the empty string?
 

No the initial values in the DB are set to null, with the exception of one field. I'm 
trying to assign the correct values to each field as I iterate through the rows. 
However after runnign the script the values either remain at null or 0 in the caase of 
an intiger. I'm reposting a clearer version of the script which actually has remarks

sub write_db_2 { #updates specified table in a dump fasion using a hash table
my ($ar_info,$table) = @_;
my ($dbh,$sth,$k,$rh_row);
$dbh = connect_try(***,**);
foreach $k (keys (%{$ar_info-[1]})){ # retrieves a generic set of fields and uses 
them to assign values for each row.
if ($table eq prop_info){ # checks which table is being used and assigns the 
correct SQL statement
$sth = $dbh-prepare (UPDATE prop_info
   SET $k = ?
   WHERE prop_str_addr = ?;) or
   err_trap(failed to prepare statement\n);
}elsif ($table eq own_info){
$sth = $dbh-prepare (UPDATE own_info
   SET $k = ?
   WHERE own_str_addr = ?;) or
   err_trap(failed to prepare statement\n);


}
foreach $rh_row (@$ar_info) { # iterates through the list of rows and assigns 
the correct value to the field
print ::$k=$rh_row-{$k}; # this is an internal check to verify what 
values are being inserted
$sth-bind_param (1,$rh_row-{$k});
if ($table eq prop_str_addr) {
$sth-bind_param (2,$rh_row-{prop_str_addr});
}elsif  ($table eq own_str_addr) {
$sth-bind_param (2,$rh_row-{own_str_addr});
}
$sth-execute() or
err_trap(failed to execute statement\n);

}
print \n===\n;

}
$sth-finish();
$dbh-disconnect or
err_trap(failed to disconnect statement\n);
}



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl DBD::mysql failed - Issued Solved.

2004-01-05 Thread Aleksei Wolff
Issue resolved.  For anybody else who runs into this problem here is what I did.
 
 
1.  went to ftp.suse.com and navigated to /pub/suse/9.0/suse/i586.
 
2. I downloaded zlib-devel-1.1.4-232.i586.rpm
 
3.  rpm -Uvh zlib-devel-1.1.4-232.i586.rpm
 
4.  then I did the perl Makefile.PL, make, make test, make install.
 
I did receive other countless errors/warnings but overall mysql was added to the list 
of drivers for DBI.  I have yet to test it by running a perl script that access mysql 
(that's tonight's lesson).
 
 
Thanks all for the responses.
 
 


Michael Stassen [EMAIL PROTECTED] wrote:

Aleksei Wolff wrote:

 I am on suse 9.0.
 
 using cpan perl module (perl -MCPAN -e shell)
 and install DBD::mysql
 
 obtained the following error:
 
 An error occurred while linking the DBD::mysql
 driver. The error message seems to indicate that you
 dont have a libz.a or a libza.so
 
 Can anybody suggest a possible fix?
 
 Thanks in advance folks!!


Aleksei Wolff further wrote:
 I am trying to install the DBI driver for mysql..i got an error which
 the INSTALL.html file says can be fixed by:
 
 If this is the case for you, install an RPM archive like libz-devel,
 libgz-devel, zlib-devel or gzlib-devel or something similar.
 
 Can anybody clue me in on what the above pakages (libz-devel, 
 libgz-devel, zlib-devel, gzlib-devel) do? how do I install? I am on
 suse 9.0
 
 Thanks.

It's asking for the libz compression library. If you don't already have 
it, see .

Michael


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Perl DBD::mysql failed :(

2004-01-04 Thread Aleksei Wolff
I am on suse 9.0.

using cpan perl module (perl -MCPAN -e shell)
and install DBD::mysql

obtained the following error:

An error occurred while linking the DBD::mysql
driver.  The error message seems to indicate that you
dont have a libz.a or a libza.so

Can anybody suggest a possible fix?


Thanks in advance folks!!

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl DBD::mysql failed :(

2004-01-04 Thread Michael Stassen
Aleksei Wolff wrote:

I am on suse 9.0.

using cpan perl module (perl -MCPAN -e shell)
and install DBD::mysql
obtained the following error:

An error occurred while linking the DBD::mysql
driver.  The error message seems to indicate that you
dont have a libz.a or a libza.so
Can anybody suggest a possible fix?

Thanks in advance folks!!


Aleksei Wolff further wrote:
I am trying to install the DBI driver for mysql..i got an error which
 the INSTALL.html file says can be fixed by:
If this is the case for you, install an RPM archive like libz-devel,
 libgz-devel, zlib-devel or gzlib-devel or something similar.
Can anybody clue me in on what the above pakages (libz-devel, 
libgz-devel, zlib-devel, gzlib-devel) do? how do I install? I am on
suse 9.0

Thanks.
It's asking for the libz compression library.  If you don't already have 
it, see http://www.gzip.org/zlib/.

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Executing concurrent select statements from perl on MySQL ISAM tables(fwd)

2002-11-26 Thread Rodney Broom
Sorry, Geetika. It looks like I lost this thread in the mix.

Have you tried some Perl like this:

# concurrent.pl

# Check start time.

for my $n (1..$DO_TRIES) {
  print qq{Doing # [$n] PID [$$]\n};
  my $pid = fork();

  if ($pid == 0) {
print qq{Child [$$] running command.\n};
exec(qq{echo '$query' | $MYSQL $DATABASE  /dev/null});
  }
}

# Check end time
# Do some math and make a report.


---
Rodney Broom
President, R.Broom Consulting
http://www.rbroom.com/

sql



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Executing concurrent select statements from perl on MySQL ISAM tables(fwd)

2002-11-25 Thread Geetika Tewari

I am trying to make my perl script fork several processes that all execute
'select' statements on MySQL.  I want the statements to happen
concurrently (as I want to monitor the behaviour of MySQL with native ISAM
tables under this concurrent Read access). So I am using 'fork'.  However,
I think my 'select' statements are not happening concurrently.  Is there
something I am missing? Thanks.


Does anyone please have any sample code on how to execute *concurrent*
MySQL select statements on MyISAM tables?  I am looking for perl scripts,
bash scripts, whatever.



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Executing concurrent select statements from perl on MySQL ISAM tables (fwd)

2002-11-25 Thread Dan Nelson
In the last episode (Nov 25), Geetika Tewari said:
 I am trying to make my perl script fork several processes that all
 execute 'select' statements on MySQL.  I want the statements to
 happen concurrently (as I want to monitor the behaviour of MySQL with
 native ISAM tables under this concurrent Read access). So I am using
 'fork'.  However, I think my 'select' statements are not happening
 concurrently.  Is there something I am missing? Thanks.

That should work.  As a test, run two complicated selects, preferably
ones that take a couple seconds to run, then run show processlist
from a mysql prompt.

-- 
Dan Nelson
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Executing concurrent select statements from perl on MySQL ISAM tables(fwd)

2002-11-25 Thread Rodney Broom
From: Geetika Tewari [EMAIL PROTECTED]

 ...perl script fork several processes...
 ...I think my 'select' statements are not happening concurrently.

Why do you think that?

---
Rodney Broom
President, R.Broom Consulting
http://www.rbroom.com/

sql



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Executing concurrent select statements from perl on MySQL ISAM tables(fwd)

2002-11-25 Thread Geetika Tewari


My previous question raised some follow up questions, so I am going to
try to clarify now by explaining the root of my problems:

My original (bash) script is the following:


./getTime.pl  result.txt
echo started: concurrent.

# doing level of concurrency $CL
let I=1

while [ $I -le $CL ]; do
   ./my_read.pl 
let I=$I+1
done

./getTime.pl  result.txt




My_read.pl just executes a single select statement on a database of 10^4
tuples in a MySQL version 3.23.53 MyISAM table. One such select takes 1.75
seconds to run serially.  The getTime.pl script gives me the time in
microseconds before and after the transaction using gettimeofday().

By running many my_real.pl with the  sign, I am trying to generate
several simultaneous concurrent READ transactions on the database. I want
to measure the change in the timing as I raise the concurrency level ($CL).
Note I am using MyISAM tables.  While they do not have transactional
support, they should cater to concurrent Read-only transactions.

However the time results I have obtained thus far indicate that the
my_read.pl script is running sequentially.  The TPS (transactions per
seconds) ratio remains constant.

I am using Debian with 256MB of RAM, and 4 GB of hard disk. Each tuple in
my database has roughly 4 doubles.

Also, I am pretty sure that the transactions are long enough to be
simultaneous.






-- Forwarded message --
Date: Mon, 25 Nov 2002 12:38:45 -0500 (EST)
To: [EMAIL PROTECTED]
Subject: Executing concurrent select statements from perl on MySQL ISAM
tables (fwd)


I am trying to make my perl script fork several processes that all execute
'select' statements on MySQL.  I want the statements to happen
concurrently (as I want to monitor the behaviour of MySQL with native ISAM
tables under this concurrent Read access). So I am using 'fork'.  However,
I think my 'select' statements are not happening concurrently.  Is there
something I am missing? Thanks.


Does anyone please have any sample code on how to execute *concurrent*
MySQL select statements on MyISAM tables?  I am looking for perl scripts,
bash scripts, whatever.




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl with Mysql

2002-10-03 Thread Amer Neely

 HI all
 I'm trying to do the following
 
---
 # want to select (just preparing) every thing from the table PERSON 
 where i don't know the deptID yet.
 $per = $dbh-prepare(SELECT * FROM person WHERE deptID = ?);
  
 # selecting deptID from the table ACCOUNT, say  with some condition
 $acc = $dbh-prepare(SELECT deptID FROM account WHERE ;   
   
 $acc-execute()
 or die Can't execute the SQL statment: $DBI::errstr\n;
 
 while ( @accRow = $acc-fetchrow_array ) {
 # For each deptID I get from the ACCOUNT table, I want all the info from 
 the PERSON table
 $per-execute($accRow[0] )
 or die Can't execute the SQL statment: 
 $DBI::errstr\n;

The statements above are all part of a subroutine, and not meant to be
executed as individual commands. Here's what is on the page you
referenced:

sub age_by_id 
{
# Arguments: database handle, person ID number
my ($dbh, $id) = @_;
my $sth = $dbh-prepare('SELECT age FROM people WHERE id = ?')
or die Couldn't prepare statement:  . $dbh-errstr;
$sth-execute($id) 
or die Couldn't execute statement:  . $sth-errstr;
my ($age) = $sth-fetchrow_array();
return $age;
}

You have to pass this subroutine 2 arguments when you execute it: $dbh
and $id before it will work. 
-- 
/* All outgoing email scanned by Norton Antivirus 2002 */
Amer Neely, Softouch Information Services
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
V: 519.438.5887
Perl | PHP | MySQL | CGI programming for all data entry forms.
We make web sites work!


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Perl with Mysql :

2002-10-02 Thread vinita vigine Murugiah

HI all
I'm trying to do the following
---
# want to select (just preparing) every thing from the table PERSON 
where i don't know the deptID yet.
$per = $dbh-prepare(SELECT * FROM person WHERE deptID = ?);
 
# selecting deptID from the table ACCOUNT, say  with some condition
$acc = $dbh-prepare(SELECT deptID FROM account WHERE ;   
  
$acc-execute()
or die Can't execute the SQL statment: $DBI::errstr\n;

while ( @accRow = $acc-fetchrow_array ) {
# For each deptID I get from the ACCOUNT table, I want all the info from 
the PERSON table
$per-execute($accRow[0] )
or die Can't execute the SQL statment: 
$DBI::errstr\n;
..

-
When I execute above coding I got error saying
DBD::mysql::st execute failed: Column: 'deptID' in where clause is 
ambiguous at ./mkPasswdFile line 76, STDIN chunk 2.

I'm following the example in http://www.perl.com/pub/a/1999/10/DBI.html

The line 76 : $per-execute($accRow[0] )

I also tried quote($accRow[0]), any idea???

Thank you for you help
Vinita





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Perl and mySQL and character sets.

2002-09-22 Thread Shaun Bramley

Hello all,

I am currently using perl to import some information into a mysql db.  At
this point in time I have two issues:

1.  The text files that are being imported contain both english and french
text.  My text editor (textpad) gladly displays the text with all proper
hyphens and accentuated characters.  Now when I use perl to read the files,
the characters that are being displayed are not what I am expecting to see.
Apparently perl is reading the file as UTF8??  How do I get it to recognize
the file as using the ISO-8859-1 character set??  Now this leads to my
second question

2.  Does how perl is displaying the text really matter? will it store the
'proper' character or will it store the messed up character?

3. Does mysql by default use the ISO-8859-1 character set?

Any help is greatly appreciated.

Thanks Shaun

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: html to perl to mysql

2002-03-27 Thread Lance Uyehara

 Using apache 1.3.23 for win32
 WinXp and Perl 5.6  and Mysql 3.23.44-nt
 The localhost test page by apache runs correctly
 The perl script runs from the command line, the Browser url line and just
by
 clicking it in the dir.

 Trying to launch this perl-dbi script from the browser, all it does is
 insert data into an Mysql table by taking values from the html customer
 page. I used
  form method=post and action=myperlscript
 The browser displays a new page which displays the perl source code.

Something else could be wrong, but this is usually an indicator your
Content-type is incorrect. Your header should be Content-type: text/html

-Lance



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: [OT] html to perl to mysql

2002-03-27 Thread Rodney Broom

From: Bob T [EMAIL PROTECTED]

 The browser displays a new page which displays the perl source code.
 How do I run the perl script from the browser

This means that Apache isn't executing your code, instead he's just reading in the 
text of myperlscript and sending it to the browser. You need to tell Apache to 
execute this script. Try adding something like this to your Apache config:

  AddHandler cgi-script .cgi

This assumes that your script is actually called myperlscript.cgi. You'll also have 
to make sure that the file is formatted properly. For instance, your MS Windows might 
want the shebang at the top to look a certain way, maybe like this:

  #! perl



---
Rodney Broom
Programmer: Desert.Net

sql



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




html to perl to mysql

2002-03-26 Thread Bob T

Using apache 1.3.23 for win32
WinXp and Perl 5.6  and Mysql 3.23.44-nt
The localhost test page by apache runs correctly
The perl script runs from the command line, the Browser url line and just by
clicking it in the dir.

Trying to launch this perl-dbi script from the browser, all it does is
insert data into an Mysql table by taking values from the html customer
page. I used
 form method=post and action=myperlscript
The browser displays a new page which displays the perl source code.

How do I run the perl script from the browser

Bob T


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




PERL DBB::MYSQL MAKE TEST PROBLEM....

2002-02-21 Thread Darren Ball

I've been having some troubles install dbd::mysql on
Solaris 2.4 - make test is failing and I can't figure
out what is going wrong.  The following shows the
results coming back from make test

If anybody can help me out here, I would appreciate
it.  Thanks.



make[1]: Entering directory
`/home/dsball/Msql-Mysql-modules-1.2219/mysql'
make[1]: Leaving directory
`/home/dsball/Msql-Mysql-modules-1.2219/mysql'
make[1]: Entering directory
`/home/dsball/Msql-Mysql-modules-1.2219/mysql'
PERL_DL_NONLAZY=1 /usr/local/bin/perl -I.././blib/arch
-I.././blib/lib
-I/usr/local/lib/perl5/sun4-solaris/5.00401
-I/usr/local/lib/perl5 -e 'use Test::Harness
qw(runtests $verbose); $verbose=0; runtests @ARGV;'
t/*.t
t/00baseinstall_driver(mysql) failed:
Can't load '.././blib/arch/auto/DBD/mysql/mysql.so'
for module DBD::mysql: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/00base.t line 38
dubious
Test returned status 2 (wstat 512)
DIED. FAILED tests 4-5
Failed 2/5 tests, 60.00% okay
t/10dsnlist.install_driver(mysql) failed:
Can't load '.././blib/arch/auto/DBD/mysql/mysql.so'
for module DBD::mysql: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/10dsnlist.t line 45
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/20createdrop.t line 47
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/30insertfetch.t line 48
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 3) line 2

 at t/40bindparam.t line 64
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/40blobs.t line 68
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/40listfields.t line 57
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
line 155.

 at (eval 1) line 2

 at t/40nulls.t line 50
dubious
Test returned status 2 (wstat 512)
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: ld.so.1: /usr/local/bin/perl:
fatal: relocation error: file
.././blib/arch/auto/DBD/mysql/mysql.so: symbol
newSVpvn: referenced symbol not found at

Re: PERL DBB::MYSQL MAKE TEST PROBLEM....

2002-02-21 Thread Ken Menzel

Hi Darren,
   The tests rely on the perl BDB and mysql-modules packages for perl.
Have you installed and tested these?
Ken
- Original Message -
From: Darren Ball [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 10:27 AM
Subject: PERL DBB::MYSQL MAKE TEST PROBLEM


 I've been having some troubles install dbd::mysql on
 Solaris 2.4 - make test is failing and I can't figure
 out what is going wrong.  The following shows the
 results coming back from make test

 If anybody can help me out here, I would appreciate
 it.  Thanks.



 make[1]: Entering directory
 `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
 make[1]: Leaving directory
 `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
 make[1]: Entering directory
 `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
 PERL_DL_NONLAZY=1 /usr/local/bin/perl -I.././blib/arch
 -I.././blib/lib
 -I/usr/local/lib/perl5/sun4-solaris/5.00401
 -I/usr/local/lib/perl5 -e 'use Test::Harness
 qw(runtests $verbose); $verbose=0; runtests @ARGV;'
 t/*.t
 t/00baseinstall_driver(mysql) failed:
 Can't load '.././blib/arch/auto/DBD/mysql/mysql.so'
 for module DBD::mysql: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/00base.t line 38
 dubious
 Test returned status 2 (wstat 512)
 DIED. FAILED tests 4-5
 Failed 2/5 tests, 60.00% okay
 t/10dsnlist.install_driver(mysql) failed:
 Can't load '.././blib/arch/auto/DBD/mysql/mysql.so'
 for module DBD::mysql: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/10dsnlist.t line 45
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/20createdrop.t line 47
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/30insertfetch.t line 48
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 3) line 2

  at t/40bindparam.t line 64
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/40blobs.t line 68
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line 2

  at t/40listfields.t line 57
 dubious
 Test returned status 2 (wstat 512)
 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: ld.so.1: /usr/local/bin/perl:
 fatal: relocation error: file
 .././blib/arch/auto/DBD/mysql/mysql.so: symbol
 newSVpvn: referenced symbol not found at
 /usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
 line 155.

  at (eval 1) line

Re: PERL DBB::MYSQL MAKE TEST PROBLEM....

2002-02-21 Thread Darren Ball

Yes, this problem is happening at the 'make test' step
while installing these modules...  I have performed
the perl Makefile.PL, and the make, they seem to go
ok, just when I perform the make test, it seems to
fail with this relocation and symbol errors

--- Ken Menzel [EMAIL PROTECTED] wrote:
 Hi Darren,
The tests rely on the perl BDB and mysql-modules
 packages for perl.
 Have you installed and tested these?
 Ken
 - Original Message -
 From: Darren Ball [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 21, 2002 10:27 AM
 Subject: PERL DBB::MYSQL MAKE TEST PROBLEM
 
 
  I've been having some troubles install dbd::mysql
 on
  Solaris 2.4 - make test is failing and I can't
 figure
  out what is going wrong.  The following shows the
  results coming back from make test
 
  If anybody can help me out here, I would
 appreciate
  it.  Thanks.
 
 
 
  make[1]: Entering directory
  `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
  make[1]: Leaving directory
  `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
  make[1]: Entering directory
  `/home/dsball/Msql-Mysql-modules-1.2219/mysql'
  PERL_DL_NONLAZY=1 /usr/local/bin/perl
 -I.././blib/arch
  -I.././blib/lib
  -I/usr/local/lib/perl5/sun4-solaris/5.00401
  -I/usr/local/lib/perl5 -e 'use Test::Harness
  qw(runtests $verbose); $verbose=0; runtests
 @ARGV;'
  t/*.t
  t/00baseinstall_driver(mysql) failed:
  Can't load
 '.././blib/arch/auto/DBD/mysql/mysql.so'
  for module DBD::mysql: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/00base.t line 38
  dubious
  Test returned status 2 (wstat 512)
  DIED. FAILED tests 4-5
  Failed 2/5 tests, 60.00% okay
  t/10dsnlist.install_driver(mysql) failed:
  Can't load
 '.././blib/arch/auto/DBD/mysql/mysql.so'
  for module DBD::mysql: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/10dsnlist.t line 45
  dubious
  Test returned status 2 (wstat 512)
  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: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/20createdrop.t line 47
  dubious
  Test returned status 2 (wstat 512)
  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: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/30insertfetch.t line 48
  dubious
  Test returned status 2 (wstat 512)
  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: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 3) line 2
 
   at t/40bindparam.t line 64
  dubious
  Test returned status 2 (wstat 512)
  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: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/40blobs.t line 68
  dubious
  Test returned status 2 (wstat 512)
  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: ld.so.1:
 /usr/local/bin/perl:
  fatal: relocation error: file
  .././blib/arch/auto/DBD/mysql/mysql.so: symbol
  newSVpvn: referenced symbol not found at
 

/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm
  line 155.
 
   at (eval 1) line 2
 
   at t/40listfields.t line 57
  dubious

Re: perl DBD::mysql question: SOLVED

2002-01-28 Thread Paul van den Berg

colorparam0100,0100,0100/paramHello Jeremy, list,


I asked:

 After a select .. insert .. the mysql client returns something like:

 Query OK, 11393 rows affected (0.47 sec)

 Records: 11393  Duplicates: 0  Warnings: 0

 

 Is it possible in perl/DBI to fetch the count of duplicates and warnings,

 or even the time that the query took to process?

 

Jeremy Zawodny answered:

 The timing is done by the client (I'm pretty sure), so you might want

 to use Perl's Time::HiRes module to figure out how much time has

 elapsed.

Thanks for the suggestion.

 

 I also recall hearing that there are plan on the drawing board for

 making it easier to programmatically access warnings and errors after

 batch inserts.

 

Well, if even Jeremy does not know an answer, it is time to RTFM..

I started with the description of the c-api, where I found mysql_info(),

that returns the extra info as a string, if called immediately after a 

Load data infile,  Insert .. select .., or Update...

From there I read the DBD::mysql docs, where I found:

$infoString = $dbh-{'info'}; this corresponds whith the c-api function.


And yes, after a load data infile .. I found that:

print $filenm, $dbh-{'info'}\n;

returns:

mydatafile, Records: 93337  Deleted: 0  Skipped: 0  Warnings: 93337


There must be some regex guru out there to convert this type of string to

a proper hash, but for the moment I am quite happy with this solution.


Regards, Paul


nofill
Paul B. van den Berg   email: [EMAIL PROTECTED]
Department of Social Pharmacy and Pharmacoepidemiology
University Centre for Pharmacy tel:31-50-361 fax:31-50-3632772
Ant. Deusinglaan 1  9713 AV Groningen  Netherlands

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: perl DBD::mysql question

2002-01-25 Thread Jeremy Zawodny

On Thu, Jan 24, 2002 at 01:48:58PM +0100, Paul van den Berg wrote:
 Hello list,
 
 the regular mysql-client returns some useful information after
 batch-inserts like:

 Query OK, 11393 rows affected (0.47 sec)
 Records: 11393  Duplicates: 0  Warnings: 0
 
 I can fetch the number of effected  rows in perl/DBI with $sth-rows,
 
 but is it possible to fetch the count of duplicates and warnings, or
 even the time that the query took to process?

The timing is done by the client (I'm pretty sure), so you might want
to use Perl's Time::HiRes module to figure out how much time has
elapsed.

I also recall hearing that there are plan on the drawing board for
making it easier to programmatically access warnings and errors after
batch inserts.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936

MySQL 3.23.41-max: up 22 days, processed 514,527,539 queries (266/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




perl DBD::mysql question

2002-01-24 Thread Paul van den Berg

Hello list,

the regular mysql-client returns some useful information after batch-inserts
like:
Query OK, 11393 rows affected (0.47 sec)
Records: 11393  Duplicates: 0  Warnings: 0

I can fetch the number of effected  rows in perl/DBI with $sth-rows,

but is it possible to fetch the count of duplicates and warnings, 
or even the time that the query took to process?

Regards, Paul


Paul B. van den Berg   email: [EMAIL PROTECTED]
Department of Social Pharmacy and Pharmacoepidemiology
University Centre for Pharmacy tel:31-50-361 fax:31-50-3632772
Ant. Deusinglaan 1  9713 AV Groningen  Netherlands

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Error with code utilizing perl DBI mysql ??

2002-01-15 Thread Investor


This is a bit strange, but I was writing code
and adding some select statements that seemed to be
working fine until about the 5 th one,  ...
then i get errors :

I am a bit of a newbie at mysql  dbi.

any help much appreciated

Error:
Can’t set DBI::db-HASH(0x1b73b70-{Printerror}:
unrecongnised attribute at
C:/indogoperl/site/lib/DBI.pm line 441.
Issuing rollback() for database handle being DESTROY’d
without explicit disconnect().

Code
use DBI;
my $dir = C:/indigoperl/bin;
my $file1 = out1.txt;
my $file2 = out2.txt;
my $file3 = out3.txt;
my $file4 = out4.txt;
my $file5 = out5.txt;

open(F1, $dir/$file1) or warn Did not open $file1:
$!\n;
open(F2, $dir/$file2) or warn Did not open $file1:
$!\n;
open(F3, $dir/$file3) or warn Did not open $file1:
$!\n;
open(F4, $dir/$file4) or warn Did not open $file1:
$!\n;
open(F5, $dir/$file5) or warn Did not open $file1:
$!\n;

my ($dbh, $sth, $count, $dsn, $user, $pwd);
my ($flag, $sic, $sic2, $sic3);
my ($cite, $reg);

$dsn = DBI:mysql:host=localhost;database=air;
$user = root;
$pwd = wick;
$dbh = DBI-connect($dsn, $user, $pwd,{Printerror =
0, RaiseError = 1});

#  Table sicc
$flag =Y;
print  Enter data for sicc table? 'y' or 'n'\n;
chomp($flag = STDIN);
while ( uc($flag) eq 'Y') {  
print  Enter values for sic, sic2, sic3 separate with
commas \n;
chomp($dat = STDIN);
($sic, $sic2, $sic3) = split (/,/, $dat);
$dbh-do ( INSERT INTO sicc (sic, sic2, sic3) values
(?,?,?)  ,
undef, $sic, $sic2, $sic3);
print F1 Enter new row of data:   'y' or 'n' \n;
chomp($flag = STDIN);
undef $sic, $sic2, $sic3, $dat;
} # end of while for table sicc

# Table permitno
$f2=Y;
print  Enter data for permitno table? 'y' or 'n'\n;
chomp($f2 = STDIN);
while ( uc($f2) eq 'Y') {  
print  Enter values for pn, datep separate with
commas \n;
chomp($dat = STDIN);
($pn, $datep) = split (/,/, $dat);
$dbh-do ( INSERT INTO permitno (pn,datep) values
(?,?)  ,
undef, $pn, $datep );
print Enter new row of data:   'y' or 'n' \n;
chomp($f2 = STDIN);
undef $pn, $datep, $dat;
}  # End of while for table permitno

# Table equip
$f3=Y;

while ( uc($f3) eq 'Y') {  
print  Enter value for type  \n;
chomp($dat = STDIN);
($type) = split (/,/, $dat);
$dbh-do ( INSERT INTO equip (type) values (?)  ,
undef, $type );
print Enter new row of data:   'y' or 'n' \n;
chomp($f3 = STDIN);
undef $type, $dat;
}  # End of while for table permitno

# Table regs
$f4 = Y;
while ( uc($f4) eq 'Y') {  
print  Enter values cite and reg  \n;
chomp($dat = STDIN);
($cite, $reg) = split (/,/, $dat);
$dbh-do ( INSERT INTO regs (cite, reg) values (?,?)
 ,
undef, $cite, $reg );
print Enter new row of data:   'y' or 'n' \n;
chomp($f4 = STDIN);
undef $cite, $reg, $dat;
}  # End of while for table regs

# Table refs
$f5 = Y;
while ( uc($f5) eq 'Y') {  
print  Enter value for ref \n;
chomp($dat = STDIN);
($ref) = split (/,/, $dat);
$dbh-do ( INSERT INTO refs (ref) values (?)  ,
undef, $ref );
print Enter new row of data:   'y' or 'n' \n;
chomp($f5 = STDIN);
undef $ref, $dat;
}  # End of while for table refs


$sth=$dbh-prepare (SELECT *  FROM  sicc);
$sth-execute ();
$count = 0;
while (my $ref = $sth -fetchrow_hashref () )  {
print F3 Found a row: sic_id =$ref-{'sic_id'}, sic
=$ref-{'sic'}, sic2= $ref-{'sic2'}, 
sic3=$ref-{'sic3'}\n;
++$count;
}
$sth-finish();
print $count rows total\n;


$sth=$dbh-prepare (SELECT *  FROM  permitno);
$sth-execute ();
$count = 0;
while (my $ref = $sth -fetchrow_hashref () )  {
print F2 Found a row: pn_id =$ref-{'pn_id'}, datep
=$ref-{'datep'}, pn= $ref-{'pn'}\n;
++$count;
}
$sth-finish();
print $count rows total\n;

$sth=$dbh-prepare (SELECT *  FROM  equip);
$sth-execute ();
$count = 0;
while (my $ref = $sth -fetchrow_hashref () )  {
print F3 Row $count:   type_id =$ref-{'type_id'},
type =$ref-{'type'}\n;
++$count;
}
$sth-finish();
print $count rows total\n;

$sth=$dbh-prepare (SELECT *  FROM  regs);
$sth-execute ();
$count = 0;
while (my $ref = $sth -fetchrow_hashref () )  {
print F4 Row $count:   reg_id =$ref-{'reg_id'},
cite =$ref-{'cite'}, reg =$ref-{'reg'}\n;
++$count;
}
$sth-finish();
print $count rows total\n;

$sth=$dbh-prepare (SELECT *  FROM  refs);
$sth-execute ();
$count = 0;
while (my $ref = $sth -fetchrow_hashref () )  {
print F5 Row $count:   ref_id =$ref-{'ref_id'}, ref
=$ref-{'ref'}\n;
++$count;
}
$sth-finish();
print $count rows total\n;


close (F1);
close (F2);
close (F3);
close (F4);
close (F5);
$dbh-disconnect ();
$dbh-disconnect ();
$dbh-disconnect ();
$dbh-disconnect ();
$dbh-disconnect ();
$dbh-disconnect ();


exit (0);
/code


=
Regards,

Investorclb

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-
Before posting, please 

problems with perl DBI:DBD mysql

2001-08-31 Thread Rudy Metzger

maybe not the 100% correct list, but then again...

 SCRIPT

-

#!/usr/bin/perl -w
use DBI;

my $dbh = DBI-connect( DBI:mysql:database=xxx, xxx, xxx )
or die( Cannot connect to DB\n );

my $sth = DBI-do( INSERT INTO mytable VALUES (2,'some text') );

$dbh-disconnect
or warn( Disconnection failed: $DBI::errstr\n );

exit;

 ERROR MESSAGE ---
Can't locate auto/DBI/do.al in @INC (@INC contains:
/usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl .) at ./tst.pl line 7

-- OTHER INFORMATION ---
Linux, distribution Redhat 7.0
DBI.1.20
DBD-mysql-2.0902
perl v5.6.0

anyone experienced a similar problem?
grateful for any information whatsoever...

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: problems with perl DBI:DBD mysql

2001-08-31 Thread dwilkers

Hi,
I am sure there are cleaner ways, but this works
for my scripts just fine.



use DBI;
$drh=DBI-install_driver('mysql') || warn no Driver\n;
$dbh=$drh-connect(search:localhost,user_1) or warn No connect\n;

$cursor=$dbh-prepare(select email from opt2 where resend=100);
$cursor-execute;

while($this_addr = $cursor-fetchrow) {
push @recps, $this_addr;
}








On Fri, 31 Aug 2001, Rudy Metzger wrote:

 maybe not the 100% correct list, but then again...
 
  SCRIPT
 
 -
 
 #!/usr/bin/perl -w
 use DBI;
 
 my $dbh = DBI-connect( DBI:mysql:database=xxx, xxx, xxx )
 or die( Cannot connect to DB\n );
 
 my $sth = DBI-do( INSERT INTO mytable VALUES (2,'some text') );
 
 $dbh-disconnect
 or warn( Disconnection failed: $DBI::errstr\n );
 
 exit;
 
  ERROR MESSAGE ---
 Can't locate auto/DBI/do.al in @INC (@INC contains:
 /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0
 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0
 /usr/lib/perl5/site_perl .) at ./tst.pl line 7
 
 -- OTHER INFORMATION ---
 Linux, distribution Redhat 7.0
 DBI.1.20
 DBD-mysql-2.0902
 perl v5.6.0
 
 anyone experienced a similar problem?
 grateful for any information whatsoever...
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: problems with perl DBI:DBD mysql

2001-08-31 Thread Rodney Broom

From: Rudy Metzger [EMAIL PROTECTED]

  ERROR MESSAGE ---
 Can't locate auto/DBI/do.al in @INC...

It sounds like your DBI didn't get built correctly. If you think that it probably was 
built right, then you can start by trying to find do.al:
  % find / -name do.al
But I don't expect that to turn out the file in an acceptable location. You'll 
probably have to reinstall DBI.


---
Rodney Broom
Programmer: Desert.Net




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl Script: MySQL Slow Query Log Parser

2001-07-22 Thread Tim Bunce

Great. Thanks.

Tim.

- Original Message - 
From: Jeremy Zawodny [EMAIL PROTECTED]
To: Tim Bunce [EMAIL PROTECTED]
Cc: Nathanial Hendler [EMAIL PROTECTED]; Mysql 
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, July 20, 2001 12:05 AM
Subject: Re: Perl Script: MySQL Slow Query Log Parser


 On Wed, Jun 27, 2001 at 01:45:27PM +0100, Tim Bunce wrote:
 
  You'll find mysqldumpslow (in the mysql distribution) does all that and
  much much more
  
  It's a pity that it's not mentioned in the online documentation
  since it's a _very_ useful tool.
 
 I've submitted a patch against the manual to correct that oversight.
 
 Jeremy
 -- 
 Jeremy D. Zawodny, [EMAIL PROTECTED]
 Technical Yahoo - Yahoo Finance
 Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936 -- NEW
 
 MySQL 3.23.29: up 33 days, processed 263,361,083 queries (89/sec. avg)
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl Script: MySQL Slow Query Log Parser

2001-07-20 Thread Jeremy Zawodny

On Wed, Jun 27, 2001 at 01:45:27PM +0100, Tim Bunce wrote:

 You'll find mysqldumpslow (in the mysql distribution) does all that and
 much much more
 
 It's a pity that it's not mentioned in the online documentation
 since it's a _very_ useful tool.

I've submitted a patch against the manual to correct that oversight.

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878   Fax: (408) 349-5454   Cell: (408) 685-5936 -- NEW

MySQL 3.23.29: up 33 days, processed 263,361,083 queries (89/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Tim Bunce

You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
 I wrote a perl script that will parse slow_queries logs, and output some 
 useful information.  It's kind of hard to explain, but I'll try.  I wanted to 
 see what queries were taking a lot of time, and how often they were 
 happening.  I wrote a perl script that parses the log files, ignores queries 
 that take less than n seconds, and normalizes the queries and reports the 
 info for each queries sorted by query occurance.
 
 'normalize' meaning...
 
 this...
 
 SELECT * FROM ween WHERE pandy_fackler = 1;
 SELECT * FROM ween WHERE pandy_fackler = 15;
 
 becomes...
 
 SELECT * FROM ween WHERE pandy_fackler = XXX;
 
 this...
 
 SELECT names FROM things WHERE name LIKE '%wazoo%';
 SELECT names FROM things WHERE name LIKE '%tada%';
 
 becomes...
 
 SELECT names FROM things WHERE name LIKE 'XXX';
 
 This has proven to be a very interesting and useful tool.  You should DL it 
 and try it on your long_queries log file.
 
 Whoever runs mysql.com should put a copy on the website.  It might just be 
 the greatest thing ever (my program, not the website).
 
 For more info, and to get a copy, you can get it at:
 http://www.retards.org/mysql/index.php
 
 I'd like to hear people's thought on it.  I'm the only person to test it so 
 far, so it'd be nice to know that it works for other people.
 
 Thanks,
 Nathan Hendler
 Tucson, AZ USA
 http://retards.org/
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread sean . odonnell

any idea where any sort of documentation/tutorial can be found?

-Original Message-
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 27, 2001 1:45 PM
To: Nathanial Hendler
Cc: Mysql; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Perl Script: MySQL Slow Query Log Parser


You'll find mysqldumpslow (in the mysql distribution) does all that and
much much more

It's a pity that it's not mentioned in the online documentation
since it's a _very_ useful tool.

Tim.

On Mon, Jun 25, 2001 at 11:59:59PM -0700, Nathanial Hendler wrote:
 I wrote a perl script that will parse slow_queries logs, and output some 
 useful information.  It's kind of hard to explain, but I'll try.  I wanted
to 
 see what queries were taking a lot of time, and how often they were 
 happening.  I wrote a perl script that parses the log files, ignores
queries 
 that take less than n seconds, and normalizes the queries and reports the 
 info for each queries sorted by query occurance.
 
 'normalize' meaning...
 
 this...
 
 SELECT * FROM ween WHERE pandy_fackler = 1;
 SELECT * FROM ween WHERE pandy_fackler = 15;
 
 becomes...
 
 SELECT * FROM ween WHERE pandy_fackler = XXX;
 
 this...
 
 SELECT names FROM things WHERE name LIKE '%wazoo%';
 SELECT names FROM things WHERE name LIKE '%tada%';
 
 becomes...
 
 SELECT names FROM things WHERE name LIKE 'XXX';
 
 This has proven to be a very interesting and useful tool.  You should DL
it 
 and try it on your long_queries log file.
 
 Whoever runs mysql.com should put a copy on the website.  It might just be

 the greatest thing ever (my program, not the website).
 
 For more info, and to get a copy, you can get it at:
 http://www.retards.org/mysql/index.php
 
 I'd like to hear people's thought on it.  I'm the only person to test it
so 
 far, so it'd be nice to know that it works for other people.
 
 Thanks,
 Nathan Hendler
 Tucson, AZ USA
 http://retards.org/
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: Perl Script: MySQL Slow Query Log Parser

2001-06-27 Thread Werner Stuerenburg

 You'll find mysqldumpslow (in the mysql distribution) does all that and
 much much more

Sorry, not on my server (MySQL 3.22.32).

 It's a pity that it's not mentioned in the online documentation
 since it's a _very_ useful tool.

http://www.mysql.com/udmsearch/search.php?q=mysqldumpslow

shows no results. How come?


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 · Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Perl Script: MySQL Slow Query Log Parser

2001-06-26 Thread Nathanial Hendler

I wrote a perl script that will parse slow_queries logs, and output some 
useful information.  It's kind of hard to explain, but I'll try.  I wanted to 
see what queries were taking a lot of time, and how often they were 
happening.  I wrote a perl script that parses the log files, ignores queries 
that take less than n seconds, and normalizes the queries and reports the 
info for each queries sorted by query occurance.

'normalize' meaning...

this...

SELECT * FROM ween WHERE pandy_fackler = 1;
SELECT * FROM ween WHERE pandy_fackler = 15;

becomes...

SELECT * FROM ween WHERE pandy_fackler = XXX;

this...

SELECT names FROM things WHERE name LIKE '%wazoo%';
SELECT names FROM things WHERE name LIKE '%tada%';

becomes...

SELECT names FROM things WHERE name LIKE 'XXX';

This has proven to be a very interesting and useful tool.  You should DL it 
and try it on your long_queries log file.

Whoever runs mysql.com should put a copy on the website.  It might just be 
the greatest thing ever (my program, not the website).

For more info, and to get a copy, you can get it at:
http://www.retards.org/mysql/index.php

I'd like to hear people's thought on it.  I'm the only person to test it so 
far, so it'd be nice to know that it works for other people.

Thanks,
Nathan Hendler
Tucson, AZ USA
http://retards.org/

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problem specific to Darwin involving perl DBD::mysql

2001-06-08 Thread mysqllist



This was a problem originally submitted on msql-mysql-modules:

Under Darwin 1.3.3/PPC G4, using mysql built from mysql-3.23.36+, the perl module 
DBD-mysql-2.0901 (and previous versions of DBD::mysql do this as well) returns 0 for 
$dbh-{'mysql_insertid'} (return LAST_INSERT_ID from a database handle), but returns a 
correct value for $sth-{'mysql_insertid'} (return LAST_INSERT_ID from a statement 
handle).

The same module compiles and operates correctly under Linux/i686, which is the only 
environment I have to test against.

I am not a C programmer, but from what I can tell by looking at the C code in the 
module (written by Jochen Wiedmann [EMAIL PROTECTED]) the calls which fail seem to 
refer to functions defined in the mysql.h file in the mysql source tree.  JW suggested 
I post this problem to this list to see if anyone can shed any light on the problem.

Not knowing enough C to be able to find the source of the problem, the best hint I can 
provide as to what's going on is something to do with the size of some of the data 
structures.  I say this because compiling the module also produces the error:

dbdimp.c: In function `mysql_db_reconnect':
dbdimp.c:1694: warning: assignment from incompatible pointer type

while all definitions of the pointer type declared at this point in the code are a SV 
object, no exceptions that I can find, and JW's code calls the built-in mysql 
functions directly via two structures, one of which is very clearly defined,  being 
the statement handle structure, and also the structure associated with the working 
function, not the broken one.

The only plausible (to me) explanation I can come up with (and I repeat, I am NOT BY 
ANY MEANS a C programmer or a chip guru) is that the data type/size for some of the 
standard definitions may be strange on the G4 because of the Altivec functions built 
into the chip.  Perhaps the datatype is not being properly measured, and the 0 results 
from some bit-offset incompatibility.  Or, possibly, I'm just blowing out my a$$.

In particular, the last_insert_id datatype in the perl module is set at my_ulonglong 
which has variable definitions under different architectures.  I see that the 
configure script uses a measurement of what size a typedef longlong is on the resident 
architecture, but my attempts at trying to compile with and without the conditional 
definition of the longlong datatype only produce compiler errors in DBD::mysql 
(because I don't know what I'm doing!  I'm probably just defining a longlong as a long 
in some places and not others, like between general.h and mysql.h).

I hope someone else out there has a better idea of the source of the problem, because 
I'm just about to give up and rewrite a lot of perl code which depends on the 
$dbh-{'mysql_insertid'} call, and I REALLY don't want to do that.

Regards,

BK



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: CGI/Perl and MySQL (OT?)

2001-06-06 Thread Chris Thompson

 Trying to get text from a CGI textarea box to go into MySQL with the br
 line breaks instead on generic \n breaks. Is there an easy way to parse
the var
 and make the necessary change?


You can use a Perl regular expression. The following seems to work for me:

# replace line breaks with HTML BR tags
$textarea =~ s/\n/BR/g;

Kind regards,

Chris

Waverley Internet Design
http://www.waverley-internet.co.uk


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: CGI/Perl and MySQL (OT?)

2001-06-06 Thread Colin Faber

A better solution would be to use the DBI quote() function, see the DBI
perldoc for more information.

and FYI 99% of web clients pass CRLF not just LF so you'd need \r\n

Chris Thompson wrote:
 
  Trying to get text from a CGI textarea box to go into MySQL with the br
  line breaks instead on generic \n breaks. Is there an easy way to parse
 the var
  and make the necessary change?
 
 You can use a Perl regular expression. The following seems to work for me:
 
 # replace line breaks with HTML BR tags
 $textarea =~ s/\n/BR/g;
 
 Kind regards,
 
 Chris
 
 Waverley Internet Design
 http://www.waverley-internet.co.uk
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: CGI/Perl and MySQL (OT?)

2001-06-06 Thread Alexander Skwar

So sprach Jeffrey L. Fitzgerald am Wed, Jun 06, 2001 at 12:08:18AM -0400:
 Currently the text coming back from the database is all runs together in 
 the web browser...

Try nl2br   - php.net/nl2br

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 23 hours 47 minutes

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




CGI/Perl and MySQL (OT?)

2001-06-05 Thread Jeffrey L. Fitzgerald


Trying to get text from a CGI textarea box to go into MySQL with the br 
line breaks
instead on generic \n breaks. Is there an easy way to parse the var and 
make the necessary change?
Currently the text coming back from the database is all runs together in 
the web browser...

Thanks, Jeff


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




help! perl and MySQL Beginner Warning!

2001-02-22 Thread Thomas O'Neill

I have built a small guestbook using perl and MySQL
when i try to run my perl script i get the following error.

Software error:
[Thu Feb 22 14:38:01 2001] DBI.pm: Can't locate DBI.pm in @INC (@INC
contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005) at
/home/httpd/cgi-bin/guestbook.cgi line 8. BEGIN failed--compilation aborted
at /home/httpd/cgi-bin/guestbook.cgi line 8.

I have installed MySQL
and the two perl plugins DBI and DBD using

fooperl -MCPAN -e 'install DBI'
fooperl -MCPAN -e'install DBD::mysql'

Does anyone know where I should go from here?

(Redhat 6.2, Apache)




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: help! perl and MySQL Beginner Warning!

2001-02-22 Thread Barry Radloff

Hi Thomas 

well it may be that the install put it in another directory other than in
the ones listed below

I too am a bit of a beginner with perl and mysql but I found my DBI stuff in
another dir so I used the following in my perl script

use lib "dir/path/here/to/libs";
This tells perl to look in another dir(including the original path) for the
modules...

and it solved my problems, maybe not the best method but it did work, what I
would like to know from ppl eventually tho is how to modify the @INC
variable at a user level, IE when I log into my machine! but that I guess is
for another mailing list...

hope this helps you too

-Original Message-
From: Thomas O'Neill [mailto:[EMAIL PROTECTED]]
Sent: 22 February 2001 12:17
To: [EMAIL PROTECTED]
Subject: help! perl and MySQL Beginner Warning!


I have built a small guestbook using perl and MySQL
when i try to run my perl script i get the following error.

Software error:
[Thu Feb 22 14:38:01 2001] DBI.pm: Can't locate DBI.pm in @INC (@INC
contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
/usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005) at
/home/httpd/cgi-bin/guestbook.cgi line 8. BEGIN failed--compilation aborted
at /home/httpd/cgi-bin/guestbook.cgi line 8.

I have installed MySQL
and the two perl plugins DBI and DBD using

fooperl -MCPAN -e 'install DBI'
fooperl -MCPAN -e'install DBD::mysql'

Does anyone know where I should go from here?

(Redhat 6.2, Apache)




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




freelance web developer available - perl/php/mysql/c++/linux

2001-02-14 Thread jeff saenz

hey-

If anyone is looking for a freelance web developer check me out. I have
recently become available. We're talking perl/php/mysql/c++/linux and a
bs degreee.

jeff

--
Jeff Saenz ([EMAIL PROTECTED])
Perl/PHP/SQL/Unix Consulting
http://www.planetoid.net



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php