Re: DBD-DB2 install issue

2005-09-22 Thread Dan Scott

Alec Brecher wrote:
My DBD-DB2 installation on Fedora Core 3 is failing because it cannot 
find libdb2.so.1.


The Application Dev client is installed and works fine.  The 
DB2_HOME=/home/db2inst1/sqllib


I saw some post from Owen Berry on another list regarding this issue. 
His fix: add -Wl,-rpath,/home/db2inst1/sqllib/lib to the makefile did 
not work for me.


DBI = 1.48
DBD-DB2 = 0.78
perl = 5.8.5

Any help would be greatly appreciated.

-Alec



Hi:

Is the problem occurring at install time, or at run time (specifically 
within the context of a Web application)?


If the problem is occurring at install time, please post the exact set 
of commands you are issuing, along with the results of running 'set', 
and all of the output you get from trying to compile and install DBD::DB2.


If the problem is occurring within the context of a Web application 
where Apache seems to be dying, you need to disable SELinux 
(/usr/sbin/setenforce 0) as the default policies for SELinux in Fedora 
Core 3 / RHEL 4 prevent httpd (Apache) from loading libraries like 
libdb2.so that exist in non-standard locations. As libdb2.so resides in 
/opt/IBM/db2/V8.1/lib/ rather than /usr/lib/ , the SELinux policy 
believes that someone is trying to load an evil harmful library and 
kills the process. I wish I knew enough about SELinux policies to offer 
a modification that would enable libdb2.so to be loaded, but I just 
don't seem to have enough room in my brain...


Dan


RE: Error writing to double using ODBC

2005-09-22 Thread Jeff Urlwin
Can you try binding it as a varchar?  Instead of setting the default bind type 
to SQL_DOUBLE, which will cause more problems than it will help for the most 
part, try setting it to 12 (SQL_VARCHAR)
 
Thanks,
 
Jeff



From: Wim Livens [mailto:[EMAIL PROTECTED]
Sent: Tue 9/20/2005 8:11 AM
To: dbi-users@perl.org
Subject: Error writing to double using ODBC




I'm having trouble writing to columns of type DOUBLE using ODBC (to
Pervasive.SQL)

  $dbh = DBI-connect('dbi:ODBC:DEMODATA','','',{RaiseError = 1, PrintError 
=1}) or die $DBI::errstr;
  $sth=$dbh-prepare(update mytable set mycolumn=? where id=123) || die 
$DBI::errstr;
  $value=3/2;
  $sth-execute($value)  || die $DBI::errstr;

Yields:

  DBD::ODBC::st execute failed: [Pervasive][ODBC Client 
Interface][LNA][Pervasive][ODBC Engine Interface]Error converting to numeric 
type: Parameter #1. (SQL-22018)(DBD: st_execute/SQLExecute err=-1)

My platform:

  perl, v5.8.7 built for cygwin-thread-multi-64int
  DBI version 1.48
  DBD::ODBC vesrion 1.13
  Pervasive.SQL 08.60.0192 030

$dbh-column_info correctly gives SQL_DOUBLE

I also tried these but they don't make any difference.

  $sth-bind_param(1, $value, SQL_DOUBLE);
  $dbh-{odbc_default_bind_type}=SQL_DOUBLE;
  $dbh-do(set decimalseparatorcomma=OFF);

Any hints ?

Thanks,

Wim.





Re: Perl-Oracle DBI module

2005-09-22 Thread Tim Bunce
On Wed, Sep 21, 2005 at 06:00:48AM -0500, Cliff Nadler wrote:
 oerr ora 24322
 24322, 0, unable to delete an initialized mutex
 // *Cause:  An attempt to delete an initialized mutex failed.
 // *Action: Contact customer support.

Umm. Even if that's actually what OCIInitialize is complaining about
it's hardly helpful. Oh well, thanks anyway.

Tim.

 On Wed, 2005-09-21 at 10:18 +0100, Tim Bunce wrote:
  On Tue, Sep 20, 2005 at 07:18:25PM -0700, Mitchell, Louise M wrote:
   Oracle has some environment variables that are critical, such as
   ORACLE_HOME, NLS_LANG, etc.  It appears that these are not set for the
   user that is doing the install.  Check with your Oracle DBA if you're
   not familiar with these.
  
  And, out of idle curiosity, can someone tell me what the command
  
  oerr ORA 24322
  
  says? (I don't have access to an Oracle system right now.)
  
  I'm just guessing that maybe the error code from OCIInitialize is
  actually an oracle standard error number...
  
  Tim.
  
   -Original Message-
   From: Trivedi, Dhirendra [mailto:[EMAIL PROTECTED] 
   Sent: Tuesday, September 20, 2005 8:07 AM
   To: dbi-users@perl.org
   Subject: Perl-Oracle DBI module
   
   Hi, 
   
   Trying to install Oracle Driver for Perl I get the error message 
   
   UNKNOWN OCI STATUS 24322) OCIInitialize. Check ORACLE_HOME  and NLS
   settings etc. at t/general.t line 21
   
   Are you able to advise a work around for this ? 
   
   t/base..ok
   t/general...DBI-connect failed: (UNKNOWN OCI STATUS 24322)
   OCIInitialize. Check ORACLE_HOME  and NLS settings etc. at t/general.t
   line 21 Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322)
   OCIInitialize. Check ORACLE_HOME and NLS set tings etc.) Tests skiped.
   skipping test on this platform
   t/long..Unable to connect to Oracle ((UNKNOWN OCI STATUS
   24322) OCIInitialize. Check ORA CLE_HOME and NLS settings etc.) Tests
   skiped.
   skipping test on this platform
   t/plsql.Unable to connect to Oracle ((UNKNOWN OCI STATUS
   24322) OCIInitialize. Check ORA CLE_HOME and NLS settings etc.) Tests
   skiped.
   skipping test on this platform
   t/reauthskipping test on this platform All tests successful,
   4 tests skipped.
   
   Files=5,  Tests=5,  1 wallclock secs ( 1.20 cusr +  0.27 csys =  1.47
   CPU)
   PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
   -I/usr/local/lib/perl5/5.00503/aix -I
   /usr/local/lib/perl5/5.00503 test.pl
   Oraperl test application $Revision: 1.2 $
   
   Oraperl emulation interface version 1.39 DBD::Oracle 1.06 using OCI8 by
   Tim Bunce DBI 1.10 by Tim Bunce
   
   ata sources:
   dbi:Oracle:CATDB
   dbi:Oracle:EIBTC1
   dbi:Oracle:eibtc1
   dbi:Oracle:extproc_connection_data
   dbi:Oracle:grommit_catdb
   dbi:Oracle:grommit_eibtc1
   dbi:Oracle:grommit_nolog
   dbi:Oracle:tsmrman
   dbi:Oracle:wallace_eibtc1
   
   
   Connecting
to 'eibtc1' (from command line, else uses ORACLE_SID or TWO_TASK -
   recommended)  as 'scott/[EMAIL PROTECTED]' (via ORACLE_USERID env var or
   default - recommend name/[EMAIL PROTECTED]) (ORACLE_SID='EIBTC1',
   TWO_TASK='')
   ora_login: 24322: (UNKNOWN OCI STATUS 24322) OCIInitialize. Check
   ORACLE_HOME and NLS settings etc.
   
   Generally set TWO_TASK or ORACLE_SID but not both at the same time.
   Try to connect to the database using an oracle tool like sqlplus only if
   that works should you suspect problems with DBD::Oracle.
   Try leaving dbname value empty and set dbuser to name/[EMAIL PROTECTED]
   
   Test aborted.
   make: 1254-004 The error code from the last command is 255.
   
   
   Stop.
   
   
   
   
   
   Regards
   Dhirendra Trivedi
   Tel: 01733 417828
   Mob: 07733411458
   
   
   
   
   Thomas Cook - The ultimate expert in leisure travel, visit us at 
   
   www.thomascook.com or tune in to Thomas Cook TV on Sky
   Digital Channel 645 or ntl:home channel 857 or visit us at...
   
   www.jmc.com www.tcsignature.com www.style-holidays.co.uk
   www.neilson.co.uk www.club18-30.com www.flythomascook.com
   www.flexibletrips.com www.sunset-holidays.com 
   www.roomsandhotels.com www.thomascooksport.com
   
   This email is confidential, may be legally privileged, and is for
   the intended recipient only. Access, disclosure, copying, 
   distribution or reliance on any of it by anyone else is prohibited
   and may be a criminal offence. Please delete if obtained in error.
   Any views expressed in this message are those of the individual
   sender, except where the sender specifically states them to be 
   the views of Thomas Cook UK Ltd. 
   
   
   **
   
  
 


Don't get DBI module installed

2005-09-22 Thread Stephan . Schwalb
Hello,

I got a problem when trying to install DBI-1.48 module on a solaris 2.8 box. 
The error is:
[EMAIL PROTECTED] # make
/bin/sh -c true
cc -c  -D_REENTRANT -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -O-DVERSION=\1.48\  -DXS_VERSION=\1.48\
-KPIC -I/opt/InfoVista/ivperl/lib/5.6.1/sun4-solaris-thread-multi/CORE  Perl.c
sh: cc: not found
*** Error code 1
make: Fatal error: Command failed for target `Perl.o'

I do have gcc package installed on the system. ?? Anyone having an idea ?
Many thanks in advance

Stephan

Below is some more output:
[EMAIL PROTECTED] # perl Makefile.PL

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

*** Note:
The optional PlRPC-modules (RPC::PlServer etc) are not installed.
If you want to use the DBD::Proxy driver and DBI::ProxyServer
modules, then you'll need to install the RPC::PlServer, RPC::PlClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
http://search.cpan.org/
http://www.perl.com/CPAN/modules/by-module
http://www.perl.org/CPAN/modules/by-module
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

Creating DBI::PurePerltest variant: t/zvpp_01basics.t
Creating DBI::PurePerltest variant: t/zvpp_02dbidrv.t
Creating DBI::PurePerltest variant: t/zvpp_03handle.t
Creating DBI::PurePerltest variant: t/zvpp_04mods.t
Creating DBI::PurePerltest variant: t/zvpp_05thrclone.t
Creating DBI::PurePerltest variant: t/zvpp_06attrs.t
Creating DBI::PurePerltest variant: t/zvpp_07kids.t
Creating DBI::PurePerltest variant: t/zvpp_08keeperr.t
Creating DBI::PurePerltest variant: t/zvpp_09trace.t
Creating DBI::PurePerltest variant: t/zvpp_10examp.t
Creating DBI::PurePerltest variant: t/zvpp_11fetch.t
Creating DBI::PurePerltest variant: t/zvpp_14utf8.t
Creating DBI::PurePerltest variant: t/zvpp_15array.t
Creating DBI::PurePerltest variant: t/zvpp_20meta.t
Creating DBI::PurePerltest variant: t/zvpp_30subclass.t
Creating DBI::PurePerltest variant: t/zvpp_40profile.t
Creating DBI::PurePerltest variant: t/zvpp_41prof_dump.t
Creating DBI::PurePerltest variant: t/zvpp_42prof_data.t
Creating DBI::PurePerltest variant: t/zvpp_50dbm.t
Creating DBI::PurePerltest variant: t/zvpp_60preparse.t
Creating DBI::PurePerltest variant: t/zvpp_80proxy.t
Checking if your kit is complete...
Looks good

I see you're using perl 5.006001 on sun4-solaris-thread-multi, okay.
Remember to actually *read* the README file!
Use  'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.

Writing Makefile for DBI
[EMAIL PROTECTED] # perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
uname='sunos cassiopee 5.6 generic_105181-23 sun4u sparc sunw,ultra-5_10 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-D_REENTRANT -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-D_REENTRANT -I/usr/local/include'
ccversion='Sun WorkShop 6 update 2 C 5.3 Patch 111679-09 2002/11/12', 
gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib 
-L/tools/shared/sun/forte6u2/SUNWspro/WS6U2/lib '
libpth=/usr/local/lib /tools/shared/sun/forte6u2/SUNWspro/WS6U2/lib 
/usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lposix4 -lpthread -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib 
-L/tools/shared/sun/forte6u2/SUNWspro/WS6U2/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES 
PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Apr  3 2003 10:58:20
  @INC:

Re: DBD-DB2 install issue

2005-09-22 Thread Alec Brecher
Thank you Dan.  The make ran without complaint, but the make test failed 
4 of 5 tests. The first time I went ahead and installed anyway and ran a 
test script which completely failed.  The error was that libdb2.so.1 
could not be found.


Based on your theory below I copied libdb2.so.1 to /usr/lib and 
everything is running!  Not pretty but it works.  Thanks so much.  -Alec


Dan Scott wrote:

Alec Brecher wrote:

My DBD-DB2 installation on Fedora Core 3 is failing because it cannot 
find libdb2.so.1.


The Application Dev client is installed and works fine.  The 
DB2_HOME=/home/db2inst1/sqllib


I saw some post from Owen Berry on another list regarding this issue. 
His fix: add -Wl,-rpath,/home/db2inst1/sqllib/lib to the makefile did 
not work for me.


DBI = 1.48
DBD-DB2 = 0.78
perl = 5.8.5

Any help would be greatly appreciated.

-Alec



Hi:

Is the problem occurring at install time, or at run time (specifically 
within the context of a Web application)?


If the problem is occurring at install time, please post the exact set 
of commands you are issuing, along with the results of running 'set', 
and all of the output you get from trying to compile and install DBD::DB2.


If the problem is occurring within the context of a Web application 
where Apache seems to be dying, you need to disable SELinux 
(/usr/sbin/setenforce 0) as the default policies for SELinux in Fedora 
Core 3 / RHEL 4 prevent httpd (Apache) from loading libraries like 
libdb2.so that exist in non-standard locations. As libdb2.so resides in 
/opt/IBM/db2/V8.1/lib/ rather than /usr/lib/ , the SELinux policy 
believes that someone is trying to load an evil harmful library and 
kills the process. I wish I knew enough about SELinux policies to offer 
a modification that would enable libdb2.so to be loaded, but I just 
don't seem to have enough room in my brain...


Dan



--
Alec Brecher
AtomD / E Research Resources
office: 802 253-8908
http://www.atomd.com


Re: Don't get DBI module installed

2005-09-22 Thread James D. White
You need to build DBI with the same C compiler that was used to build the 
version of Perl
that you are using.  The Perl 5.6.1 that comes with Solaris 8 was built with 
the Sun Forte C
compiler.  You probably don't have the Sun compiler, or you wouldn't get the 
error you are
getting.  The Sun C compiler is not free like gcc.

In order to use gcc to build new modules, you need to have a Perl that was 
built with gcc.
You can download the Perl source and build it using gcc.  Install the new Perl 
into /usr/local.
The Sun built version is in /usr -- don't remove it, because some Solaris 
utilities use that
version. Then make sure that your PATH has /usr/local/bin before /usr/bin.

Building from source is not difficult and doesn't take that long.  The default 
32-bit
configuration should work well. Options USE_64_BIT_INT and USE_LARGE_FILES
should not be a problem.

I would not bother with USE_64_BIT_ALL unless you expect to use multi-gigabytes
of storage within a single program. Building a USE_64_BIT_ALL version is 
complicated
by needing to get 64-bit versions of all of the external C libraries in the 
right place.  I
have done it, but it is not easy, and that is another story.

[EMAIL PROTECTED] wrote:

 Hello,

 I got a problem when trying to install DBI-1.48 module on a solaris 2.8 box. 
 The error is:
 [EMAIL PROTECTED] # make
 /bin/sh -c true
 cc -c  -D_REENTRANT -I/usr/local/include -D_LARGEFILE_SOURCE 
 -D_FILE_OFFSET_BITS=64 -O-DVERSION=\1.48\  -DXS_VERSION=\1.48\
 -KPIC -I/opt/InfoVista/ivperl/lib/5.6.1/sun4-solaris-thread-multi/CORE  Perl.c
 sh: cc: not found
 *** Error code 1
 make: Fatal error: Command failed for target `Perl.o'

 I do have gcc package installed on the system. ?? Anyone having an idea ?
 Many thanks in advance

 Stephan

 Below is some more output:
 [EMAIL PROTECTED] # perl Makefile.PL

 *** You are using a perl configured with threading enabled.
 *** You should be aware that using multiple threads is
 *** not recommended for production environments.

 *** Note:
 The optional PlRPC-modules (RPC::PlServer etc) are not installed.
 If you want to use the DBD::Proxy driver and DBI::ProxyServer
 modules, then you'll need to install the RPC::PlServer, RPC::PlClient,
 Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
 You can install them any time after installing the DBI.
 You do *not* need these modules for typical DBI usage.

 Optional modules are available from any CPAN mirror, in particular
 http://search.cpan.org/
 http://www.perl.com/CPAN/modules/by-module
 http://www.perl.org/CPAN/modules/by-module
 ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

 Creating DBI::PurePerltest variant: t/zvpp_01basics.t
 Creating DBI::PurePerltest variant: t/zvpp_02dbidrv.t
 Creating DBI::PurePerltest variant: t/zvpp_03handle.t
 Creating DBI::PurePerltest variant: t/zvpp_04mods.t
 Creating DBI::PurePerltest variant: t/zvpp_05thrclone.t
 Creating DBI::PurePerltest variant: t/zvpp_06attrs.t
 Creating DBI::PurePerltest variant: t/zvpp_07kids.t
 Creating DBI::PurePerltest variant: t/zvpp_08keeperr.t
 Creating DBI::PurePerltest variant: t/zvpp_09trace.t
 Creating DBI::PurePerltest variant: t/zvpp_10examp.t
 Creating DBI::PurePerltest variant: t/zvpp_11fetch.t
 Creating DBI::PurePerltest variant: t/zvpp_14utf8.t
 Creating DBI::PurePerltest variant: t/zvpp_15array.t
 Creating DBI::PurePerltest variant: t/zvpp_20meta.t
 Creating DBI::PurePerltest variant: t/zvpp_30subclass.t
 Creating DBI::PurePerltest variant: t/zvpp_40profile.t
 Creating DBI::PurePerltest variant: t/zvpp_41prof_dump.t
 Creating DBI::PurePerltest variant: t/zvpp_42prof_data.t
 Creating DBI::PurePerltest variant: t/zvpp_50dbm.t
 Creating DBI::PurePerltest variant: t/zvpp_60preparse.t
 Creating DBI::PurePerltest variant: t/zvpp_80proxy.t
 Checking if your kit is complete...
 Looks good

 I see you're using perl 5.006001 on sun4-solaris-thread-multi, okay.
 Remember to actually *read* the README file!
 Use  'make' to build the software (dmake or nmake on Windows).
 Then 'make test' to execute self tests.
 Then 'make install' to install the DBI and then delete this working
 directory before unpacking and building any DBD::* drivers.

 Writing Makefile for DBI
 [EMAIL PROTECTED] # perl -V
 Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
   Platform:
 osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
 uname='sunos cassiopee 5.6 generic_105181-23 sun4u sparc sunw,ultra-5_10 '
 config_args=''
 hint=recommended, useposix=true, d_sigaction=define
 usethreads=define use5005threads=undef useithreads=define 
 usemultiplicity=define
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
 cc='cc', ccflags ='-D_REENTRANT