returning incorrect results for select on mysql database
hi, below some trace output of perl script. just do not know whether the bug is in DBI, DBD::mysql, DBIx::Class or mysql. i appreciate any suggestion if the problem should be reported elsewhere issuing query on mysql client console - i got correct results. what's more, when table grows to 50 records, script/query starts working correctly for query SELECT me.customer_id, me.company_id, me.person_id, me.customer_position, me.instance_id FROM customer me WHERE ( me.customer_id IS NULL ) i got result - fetchrow_array= ( '37' '8' '4' 'f:8 os:4 i:3' '3' ) [5 items] row1 at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 2034 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 74 so searching for customer_id is null (which does not exist in database) i got row with customer_id=37 some help appreciated. it's know problem, or new one? as i do not know whether trying to find the bug or refactor code, as i'm short of time tested on ubuntu DB3 p $DBI::VERSION 1.609 DB4 p $DBD::mysql::VERSION 4.012 DB5 p $DBIx::Class::VERSION 0.08115 mysql Server version: 5.1.41-3ubuntu12.1-log (Ubuntu) This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi debian: DB3 p $DBI::VERSION 1.611 DB5 p $DBD::mysql::VERSION 4.014 DB6 p $DBIx::Class::VERSION 0.08123 mysql Server version: 5.1.47-1 (Debian) This is perl, v5.10.1 (*) built for i486-linux-gnu-thread-multi log from ubuntu version prepare_cached DISPATCH (DBI::db=HASH(0xa163eb0) rc1/5 @4 g0 imaa201 pid#25948) at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 2060 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 730 - prepare_cached for DBD::mysql::db (DBI::db=HASH(0xa163eb0)~0xa2712e8 'SELECT me.customer_id, me.company_id, me.person_id, me.customer_position, me.instance_id FROM customer me WHERE ( me.customer_id IS NULL )' HASH(0xa276b48) 3) thr#8177008 prepare DISPATCH (DBI::db=HASH(0xa2712e8) rc1/8 @3 g0 imaa201 pid#25948) at /usr/local/lib/perl/5.10.1/DBI.pm line 1686 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 2060 1 - prepare for DBD::mysql::db (DBI::db=HASH(0xa2712e8)~INNER 'SELECT me.customer_id, me.company_id, me.person_id, me.customer_position, me.instance_id FROM customer me WHERE ( me.customer_id IS NULL )' HASH(0xa276b48)) thr#8177008 New 'DBI::st' (for DBD::mysql::st, parent=DBI::db=HASH(0xa2712e8), id=undef) dbih_setup_handle(DBI::st=HASH(0xa276d18)=DBI::st=HASH(0xa276ce8), DBD::mysql::st, a275588, Null!) dbih_make_com(DBI::db=HASH(0xa2712e8), a272958, DBD::mysql::st, 252, 0) thr#8177008 dbih_setup_attrib(DBI::st=HASH(0xa276ce8), Err, DBI::db=HASH(0xa2712e8)) SCALAR(0xa163f70) (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), State, DBI::db=HASH(0xa2712e8)) SCALAR(0xa163f90) (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), Errstr, DBI::db=HASH(0xa2712e8)) SCALAR(0xa163fa0) (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), TraceLevel, DBI::db=HASH(0xa2712e8)) 0 (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), FetchHashKeyName, DBI::db=HASH(0xa2712e8)) 'NAME' (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), HandleSetErr, DBI::db=HASH(0xa2712e8)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), HandleError, DBI::db=HASH(0xa2712e8)) CODE(0xa271448) (already defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), ReadOnly, DBI::db=HASH(0xa2712e8)) undef (not defined) dbih_setup_attrib(DBI::st=HASH(0xa276ce8), Profile, DBI::db=HASH(0xa2712e8)) undef (not defined) - dbd_st_prepare MYSQL_VERSION_ID 50145, SQL statement: SELECT me.customer_id, me.company_id, me.person_id, me.customer_position, me.instance_id FROM customer me WHERE ( me.customer_id IS NULL ) - dbd_st_free_result_sets - dbd_st_free_result_sets RC -1 - dbd_st_free_result_sets count_params statement SELECT me.customer_id, me.company_id, me.person_id, me.customer_position, me.instance_id FROM customer me WHERE ( me.customer_id IS NULL ) - dbd_st_prepare 1 - prepare= DBI::st=HASH(0xa276d18) at /usr/local/lib/perl/5.10.1/DBI.pm line 1686 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 2060 - prepare_cached= DBI::st=HASH(0xa276d18) at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 2060 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 730 execute DISPATCH (DBI::st=HASH(0xa276d18) rc1/2 @1 g0 ima1041 pid#25948) at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 1481 via at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 738 - execute for DBD::mysql::st (DBI::st=HASH(0xa276d18)~0xa276ce8) thr#8177008 - dbd_st_execute for 0a275478 - dbd_st_free_result_sets - dbd_st_free_result_sets RC -1 - dbd_st_free_result_sets mysql_st_internal_execute MYSQL_VERSION_ID 50145 parse_params
Re: Can't install DBD::Oracle because of invalid directory
Bob McGowan wrote: On 06/16/2010 01:54 PM, Martin J. Evans wrote: On 16/06/2010 20:22, Bob McGowan wrote: On 06/16/2010 05:14 AM, Martin Evans wrote: Benjamin Mark wrote: Bob McGowanbob_mcgo...@symantec.com wrote in message news:4c110b04.60...@symantec.com... On 06/09/2010 08:43 AM, Benjamin Mark wrote: Hello, I wan't to install the DBD::Oracle package on Ubuntu 8.04 LTS. I've installed a Oracle 10gR2 database (not the client) which is running well. Everytime I wan't to install the package I got the message: # Removing previously used /home/administrator/.cpan/build/DBD-Oracle-1.24 --Deleted on purpose-- thx for your answer. Yes the oracle 10g is on the same machine. But for any reason the installer/compiler can't see the right libraries packages but the path is definetivly the right one. In the maintime I've succeeded to the tell the user the right environment variables but the installer still has problems. # CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.24b.tar.gz Argument 6.30_01 isn't numeric in subroutine entry at Makefile.PL line 10 main::BEGIN() called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 10 eval {...} called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 10 Using DBI 1.601 (for perl 5.008008 on i486-linux-gnu-thread-multi) installed in /usr/lib/perl5/auto/DBI/ Argument 6.30_01 isn't numeric in numeric ge (=) at Makefile.PL line 61. Configuring DBD::Oracle for perl 5.008008 on linux (i486-linux-gnu-thread-multi) Remember to actually *READ* the README file! Especially if you have any problems. The ORACLE_HOME environment variable value (/home/oracle/product/10gR2) is not valid. --Deleted on purpose-- I find the easiest way to get DBD::Oracle working is this: o get Oracle InstantClient for your platform o unzip it somewhere (perhaps inside /home/oracle on your machine) o make sure all dirs and files in the instantclient dir are readable by the users and installers o set LD_LIBRARY_PATH to point at instant client dir e.g., export LD_LIBRARY_PATH=/home/oracle/instantclient_11_1/ o download DBD::Oracle, untar it and change into created dir o run perl Makefile.PL, make, make test sudo make install Hope this helps. Martin Martin, the point of the OP is that the standard sequence you describe isn't working for him. Ben, there are several things in the earlier part of the error messages that don't make sense. For example, 'Argument 6.30_01 isn't numeric ...' shouldn't be happening, so far as I can tell. The underscore is a readability thing, for humans, and Perl strips it (whether the string is quoted or not), so that 6.30_01 ends up being 6.3001. I tested this in debug mode and can state this with 100% confidence (besides, the docs say the same thing ;). With great respect I don't agree with this. If you have E:M 6.30_01 you do get this warning - it is scattered all over the smoke testers results. I don't think this has anything at all to do with the failure to build and that is why I ignored it. Perhaps I'm not seeing/noticing something that you are? All I see in the error message provided by the OP is 6.30_01, there is no E:M mentioned. Argument 6.30_01 isn't numeric in subroutine entry at Makefile.PL line 10 main::BEGIN() called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 10 eval {...} called at /usr/share/perl/5.8/ExtUtils/MakeMaker.pm line 10 Line 10 of Makefile.PL is: use ExtUtils::MakeMaker 5.16, qw(WriteMakefile $Verbose); and the Ben's version of E::M is 6.30_01 (note the _01) usually causes this. However, I must admit it usually causes it at line 61 like this: Argument 6.56_01 isn't numeric in numeric ge (=) at Makefile.PL line 61 which is: if ($ExtUtils::MakeMaker::VERSION = 5.43) { and now that I look at it again I am surprised it barfed at line 10. I saw the E::M version warning and ignored it out of hand assuming it was the usual one from line 61. I'd guess this may be to do with his older Perl 5.8.8. What is this and where does it come from? I agree, it would certainly change the tests, if present, I'm just not seeing it. And I goofed badly in my comment to you. The OP is following the standard procedure for building *without* the Instantclient. I realise that but given that no one had diagnosed his problem I suggested using Instant Client which in my opinion is much easier to use and has less pitfalls with file permissions, ORACLE_HOME etc. In my experience, things like this are often the result of cascading errors, that is to say, something is wrong, somewhere else, that causes these to happen. So, look at your ORACLE_HOME value. The message above says it is not valid. Fix that first, then maybe the other
Re: Get off the list
No. It just doesn't seem to work. Has anyone tested it? On Wed, 2010-06-16 at 18:27 -0500, David Nicol wrote: does your receiving MTA give you a return-path header? Maybe you forgot you are subscribed under an alias. On Wed, Jun 16, 2010 at 5:47 AM, jeff j...@roqc.no wrote: Anyone know how ? The automated method doesn't work and owner doesn't respond. LOL- You can not use the unsub word anywhere in your email or it get bounced. Is this is some diabolical plot to never let anyone leave. ;-)
RE: Get off the list
wireshark criminal is mucking with your email go to an alternate location and try from there __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: Re: Get off the list From: j...@roqc.no To: davidni...@gmail.com CC: dbi-users@perl.org Date: Thu, 17 Jun 2010 05:19:06 -0400 No. It just doesn't seem to work. Has anyone tested it? On Wed, 2010-06-16 at 18:27 -0500, David Nicol wrote: does your receiving MTA give you a return-path header? Maybe you forgot you are subscribed under an alias. On Wed, Jun 16, 2010 at 5:47 AM, jeff j...@roqc.no wrote: Anyone know how ? The automated method doesn't work and owner doesn't respond. LOL- You can not use the unsub word anywhere in your email or it get bounced. Is this is some diabolical plot to never let anyone leave. ;-) _ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
Re: returning incorrect results for select on mysql database
Original Message Subject: returning incorrect results for select on mysql database From: pp p...@webtel.pl To: dbi-users@perl.org Date: Thu Jun 17 2010 09:11:04 GMT+0200 (CEST) hi, below some trace output of perl script. just do not know whether the bug is in DBI, DBD::mysql, DBIx::Class or mysql. i appreciate any suggestion if the problem should be reported elsewhere issuing query on mysql client console - i got correct results. solved combination of DBIx::Class and mysql features as pointed me out on dbix-class mailing list Meet MySQL: http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html#sysvar_sql_auto_is_null Now meet a saner MySQL: http://search.cpan.org/~frew/DBIx-Class-0.08123/lib/DBIx/Class/Storage/DBI/mysql.pm#set_strict_mode -- regards piotr
Problem with make test DBD Oracle on RHEL5 server
I am having a problem getting DBD-Oracle to work. It is failing on the make test on the initial test. If you could please give me any ideas you might have on resolving this I would be so grateful. I have been trying to resolve this for several days!! Thanks in advance [r...@cvlnxsybdq01 DBD-Oracle-1.24]# perl Makefile.PL Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi) Remember to actually *READ* the README file! Especially if you have any problems. Installing on a linux, Ver#2.6 Using Oracle in /usr/lib/oracle/10.2.0.4/client64 DEFINE _SQLPLUS_RELEASE = 1002000400 (CHAR) Oracle version 10.2.0.4 (10.2) Found /usr/share/oracle/10.2.0.4/client64/demo.mk Using /usr/share/oracle/10.2.0.4/client64/demo.mk Your LD_LIBRARY_PATH env var is set to '/usr/lib/oracle/10.2.0.4/client64/lib:/opt/sybase/DataAccess/ODBC/lib:/opt/sybase/OCS-15_0/lib3p:/opt/sybase/OCS-15_0/lib:/opt/sybase/ASE-15_0/lib:' Reading /usr/share/oracle/10.2.0.4/client64/demo.mk WARNING: Oracle /usr/share/oracle/10.2.0.4/client64/demo.mk doesn't define a 'build' rule. WARNING: I will now try to guess how to build and link DBD::Oracle for you. This kind of guess work is very error prone and Oracle-version sensitive. It is possible that it won't be supported in future versions of DBD::Oracle. *PLEASE* notify dbi-users about exactly _why_ you had to build it this way. Found header files in /usr/include/oracle/10.2.0.4/client. Checking for functioning wait.ph System: perl5.008008 linux ls20-bc2-13.build.redhat.com 2.6.18-128.1.10.el5 #1 smp wed apr 29 13:53:08 edt 2009 x86_64 x86_64 x86_64 gnulinux Compiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm Linker: /usr/bin/ld Sysliblist: Oracle makefiles would have used these definitions but we override them: CC: /usr/bin/g++32 LDFLAGS: -g [-g] Linking with -L../../ -locci -lclntsh -lpthread [from $(CCLIB)] Checking if your kit is complete... Looks good Warning: -L../../ changed to -L/junk/DBD-Oracle-1.24/../../ LD_RUN_PATH=/usr/lib/oracle/10.2.0.4/client64/lib Using DBD::Oracle 1.24. Using DBD::Oracle 1.24. Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ Writing Makefile for DBD::Oracle *** If you have problems... read all the log printed above, and the README and README.help.txt files. (Of course, you have read README by now anyway, haven't you?) [r...@cvlnxsybdq01 DBD-Oracle-1.24]# make cp Oracle.pm blib/lib/DBD/Oracle.pm cp oraperl.ph blib/lib/oraperl.ph cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h cp Oraperl.pm blib/lib/Oraperl.pm cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm /usr/bin/perl -p -e s/~DRIVER~/Oracle/g /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/Driver.xst Oracle.xsi /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs Oracle.xsc mv Oracle.xsc Oracle.c gcc -c -I/usr/include/oracle/10.2.0.4/client -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\1.24\ -DXS_VERSION=\1.24\ -fPIC -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\10.2.0.4\ Oracle.c gcc -c -I/usr/include/oracle/10.2.0.4/client -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\1.24\ -DXS_VERSION=\1.24\ -fPIC -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\10.2.0.4\ dbdimp.c dbdimp.c: In function âfb_ary_cb_allocâ:
Perl 5.8.9 DBI/DBD::Oracle make test error
Hi, I have HP-UX 11.11(64bit PA-RISC) and Perl 5.8.9.(32bit 64bit) The Perl I installed from depot file from www.develooper.com. I am using gcc 3.4.3 depot file from ftp.thewrittenword.com. I am new to Perl. I want to install DBD::Oracle 1.24 (from CPAN) so that I can connect to remote database Oracle 10g. I am using Oracle Instantclient 10.2 (32bit) from Oracle download. DBI is included in the perl 5.8.9. There is no issue on DBD compilation and make, the problem I have is when I run make test. The error is: # make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01base# Test loading DBI, DBD::Oracle and version t/01baseok t/10general.DBI connect('','scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zmy12s ora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at t/10general.t line 35 Bailout called. Further testing stopped: Unable to connect to Oracle (ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.) *** Error exit code 1 I can connect to Oracle using sqlplus manually. DBD make test failed to connect to Oracle. I have set ORACLE_HOME, LD_LIBRARY_PATH SHLIB_PATH to my Oracle Instantclient folder at /opt/instantclient_10_2. I have changed t/10general.t under DBD setup folder to include the environment variables but still failed. The variables are : $ENV{ORACLE_HOME} = '/opt/instantclient_10_2'; $ENV{NLS_LANG} = '.WE8ISO8859P15'; #$ENV{NLS_LANG} = 'en_US.UTF8'; #$ENV{NLS_LANG} = 'AMERICAN_AMERICA.UTF8'; #$ENV{ORACLE_USERID} = 'scott/tiger'; $ENV{ORACLE_SID} = 'CGISSRND'; $ENV{LD_LIBRARY_PATH} = '/opt/instantclient_10_2'; $ENV{SHLIB_PATH} = '/opt/instantclient_10_2'; $ENV{LD_RUN_PATH} = '/opt/instantclient_10_2'; $ENV{TNS_ADMIN} = '/opt/instantclient_10_2/network/admin'; $ENV{LD_PRELOAD} = '/opt/java1.5/jre/lib/PA_RISC2.0/libjava.sl'; #$ENV{TWO_TASK} = 'zmy12sora02'; I manually set $dbh as listed below: my $dbh = DBI-connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=(ADDRESS=(PROTO COL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))}, ); I can ping my server's IP address. I tried different variable settings that I can find from other threads in Internet but failed. Please help. Thanks. regards, Yeow
Re: Problem with make test DBD Oracle on RHEL5 server
Looks like the 64 bit client you are using is not all there. I would give the instant client 64 a shot. Just to be sure get the SDK as well. Cheers John scoles I am having a problem getting DBD-Oracle to work. It is failing on the make test on the initial test. If you could please give me any ideas you might have on resolving this I would be so grateful. I have been trying to resolve this for several days!! Thanks in advance [r...@cvlnxsybdq01 DBD-Oracle-1.24]# perl Makefile.PL Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ Configuring DBD::Oracle for perl 5.008008 on linux (x86_64-linux-thread-multi) Remember to actually *READ* the README file! Especially if you have any problems. Installing on a linux, Ver#2.6 Using Oracle in /usr/lib/oracle/10.2.0.4/client64 DEFINE _SQLPLUS_RELEASE = 1002000400 (CHAR) Oracle version 10.2.0.4 (10.2) Found /usr/share/oracle/10.2.0.4/client64/demo.mk Using /usr/share/oracle/10.2.0.4/client64/demo.mk Your LD_LIBRARY_PATH env var is set to '/usr/lib/oracle/10.2.0.4/client64/lib:/opt/sybase/DataAccess/ODBC/lib:/opt/sybase/OCS-15_0/lib3p:/opt/sybase/OCS-15_0/lib:/opt/sybase/ASE-15_0/lib:' Reading /usr/share/oracle/10.2.0.4/client64/demo.mk WARNING: Oracle /usr/share/oracle/10.2.0.4/client64/demo.mk doesn't define a 'build' rule. WARNING: I will now try to guess how to build and link DBD::Oracle for you. This kind of guess work is very error prone and Oracle-version sensitive. It is possible that it won't be supported in future versions of DBD::Oracle. *PLEASE* notify dbi-users about exactly _why_ you had to build it this way. Found header files in /usr/include/oracle/10.2.0.4/client. Checking for functioning wait.ph System: perl5.008008 linux ls20-bc2-13.build.redhat.com 2.6.18-128.1.10.el5 #1 smp wed apr 29 13:53:08 edt 2009 x86_64 x86_64 x86_64 gnulinux Compiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm Linker: /usr/bin/ld Sysliblist: Oracle makefiles would have used these definitions but we override them: CC: /usr/bin/g++32 LDFLAGS: -g [-g] Linking with -L../../ -locci -lclntsh -lpthread [from $(CCLIB)] Checking if your kit is complete... Looks good Warning: -L../../ changed to -L/junk/DBD-Oracle-1.24/../../ LD_RUN_PATH=/usr/lib/oracle/10.2.0.4/client64/lib Using DBD::Oracle 1.24. Using DBD::Oracle 1.24. Using DBI 1.52 (for perl 5.008008 on x86_64-linux-thread-multi) installed in /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/ Writing Makefile for DBD::Oracle *** If you have problems... read all the log printed above, and the README and README.help.txt files. (Of course, you have read README by now anyway, haven't you?) [r...@cvlnxsybdq01 DBD-Oracle-1.24]# make cp Oracle.pm blib/lib/DBD/Oracle.pm cp oraperl.ph blib/lib/oraperl.ph cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h cp Oraperl.pm blib/lib/Oraperl.pm cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm /usr/bin/perl -p -e s/~DRIVER~/Oracle/g /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI/Driver.xst Oracle.xsi /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Oracle.xs Oracle.xsc mv Oracle.xsc Oracle.c gcc -c -I/usr/include/oracle/10.2.0.4/client -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\1.24\ -DXS_VERSION=\1.24\ -fPIC -I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE -Wall -Wno-comment -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\10.2.0.4\ Oracle.c gcc -c -I/usr/include/oracle/10.2.0.4/client -I/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\1.24\ -DXS_VERSION=\1.24\ -fPIC
Re: Perl 5.8.9 DBI/DBD::Oracle make test error
Yeow Yiew Choong-PBKN64 wrote: I really doubt there is a scott/tiger user on you Oracle box set the ORACLE_USERID to a value user and password sid combination and then come back to the list ie export ORACLE_USERID=my_user/my_passw...@my_id Hi, I have HP-UX 11.11(64bit PA-RISC) and Perl 5.8.9.(32bit 64bit) The Perl I installed from depot file from www.develooper.com. I am using gcc 3.4.3 depot file from ftp.thewrittenword.com. I am new to Perl. I want to install DBD::Oracle 1.24 (from CPAN) so that I can connect to remote database Oracle 10g. I am using Oracle Instantclient 10.2 (32bit) from Oracle download. DBI is included in the perl 5.8.9. There is no issue on DBD compilation and make, the problem I have is when I run make test. The error is: # make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01base# Test loading DBI, DBD::Oracle and version t/01baseok t/10general.DBI connect('','scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zmy12s ora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at t/10general.t line 35 Bailout called. Further testing stopped: Unable to connect to Oracle (ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.) *** Error exit code 1 I can connect to Oracle using sqlplus manually. DBD make test failed to connect to Oracle. I have set ORACLE_HOME, LD_LIBRARY_PATH SHLIB_PATH to my Oracle Instantclient folder at /opt/instantclient_10_2. I have changed t/10general.t under DBD setup folder to include the environment variables but still failed. The variables are : $ENV{ORACLE_HOME} = '/opt/instantclient_10_2'; $ENV{NLS_LANG} = '.WE8ISO8859P15'; #$ENV{NLS_LANG} = 'en_US.UTF8'; #$ENV{NLS_LANG} = 'AMERICAN_AMERICA.UTF8'; #$ENV{ORACLE_USERID} = 'scott/tiger'; $ENV{ORACLE_SID} = 'CGISSRND'; $ENV{LD_LIBRARY_PATH} = '/opt/instantclient_10_2'; $ENV{SHLIB_PATH} = '/opt/instantclient_10_2'; $ENV{LD_RUN_PATH} = '/opt/instantclient_10_2'; $ENV{TNS_ADMIN} = '/opt/instantclient_10_2/network/admin'; $ENV{LD_PRELOAD} = '/opt/java1.5/jre/lib/PA_RISC2.0/libjava.sl'; #$ENV{TWO_TASK} = 'zmy12sora02'; I manually set $dbh as listed below: my $dbh = DBI-connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=(ADDRESS=(PROTO COL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))}, ); I can ping my server's IP address. I tried different variable settings that I can find from other threads in Internet but failed. Please help. Thanks. regards, Yeow
FW: Perl 5.8.9 DBI/DBD::Oracle make test error
Forgot to cc this reply to the list -Original Message- From: CAMPBELL, ED (ATTBST) Sent: Thursday, June 17, 2010 12:52 PM To: 'John Scoles' Subject: RE: Perl 5.8.9 DBI/DBD::Oracle make test error The scott/tiger user in Oracle is Locked with an expired password by default, so you need to check. If you can login from sqlplus with scott/tiger then I would check the Roles given scott user. I had to add DBA to that user to get it to pass the make test -Original Message- From: John Scoles [mailto:sco...@pythian.com] Sent: Thursday, June 17, 2010 12:04 PM To: Yeow Yiew Choong-PBKN64 Cc: dbi-users@perl.org Subject: Re: Perl 5.8.9 DBI/DBD::Oracle make test error Yeow Yiew Choong-PBKN64 wrote: I really doubt there is a scott/tiger user on you Oracle box set the ORACLE_USERID to a value user and password sid combination and then come back to the list ie export ORACLE_USERID=my_user/my_passw...@my_id Hi, I have HP-UX 11.11(64bit PA-RISC) and Perl 5.8.9.(32bit 64bit) The Perl I installed from depot file from www.develooper.com. I am using gcc 3.4.3 depot file from ftp.thewrittenword.com. I am new to Perl. I want to install DBD::Oracle 1.24 (from CPAN) so that I can connect to remote database Oracle 10g. I am using Oracle Instantclient 10.2 (32bit) from Oracle download. DBI is included in the perl 5.8.9. There is no issue on DBD compilation and make, the problem I have is when I run make test. The error is: # make test PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/01base# Test loading DBI, DBD::Oracle and version t/01baseok t/10general.DBI connect('','scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zmy12s ora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc. at t/10general.t line 35 Bailout called. Further testing stopped: Unable to connect to Oracle (ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.) *** Error exit code 1 I can connect to Oracle using sqlplus manually. DBD make test failed to connect to Oracle. I have set ORACLE_HOME, LD_LIBRARY_PATH SHLIB_PATH to my Oracle Instantclient folder at /opt/instantclient_10_2. I have changed t/10general.t under DBD setup folder to include the environment variables but still failed. The variables are : $ENV{ORACLE_HOME} = '/opt/instantclient_10_2'; $ENV{NLS_LANG} = '.WE8ISO8859P15'; #$ENV{NLS_LANG} = 'en_US.UTF8'; #$ENV{NLS_LANG} = 'AMERICAN_AMERICA.UTF8'; #$ENV{ORACLE_USERID} = 'scott/tiger'; $ENV{ORACLE_SID} = 'CGISSRND'; $ENV{LD_LIBRARY_PATH} = '/opt/instantclient_10_2'; $ENV{SHLIB_PATH} = '/opt/instantclient_10_2'; $ENV{LD_RUN_PATH} = '/opt/instantclient_10_2'; $ENV{TNS_ADMIN} = '/opt/instantclient_10_2/network/admin'; $ENV{LD_PRELOAD} = '/opt/java1.5/jre/lib/PA_RISC2.0/libjava.sl'; #$ENV{TWO_TASK} = 'zmy12sora02'; I manually set $dbh as listed below: my $dbh = DBI-connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=(ADDRESS=(PROTO COL=TCP)(HOST=zmy12sora02)(PORT=1521))(CONNECT_DATA=(SID=CGISSRND)))}, ); I can ping my server's IP address. I tried different variable settings that I can find from other threads in Internet but failed. Please help. Thanks. regards, Yeow
Re: Building 32-Bit ONLY Perl on Mac OSX
On Tue, Jun 15, 2010 at 1:48 PM, kai.schwerm...@bill-x.de wrote: my question isn't directly related to DBI, but i need to compile a 386/32 Bit ONLY Perl Binary on Mac OSX 10.6 (SnowLeopard), not only but also because we only have a 32 Bit Oracle Instant Client... No Matter what Config-Params i tried, the only thing i get is the following: ...file was built for i386 which is not the architecture being linked (x86_64)... Does anyone have an idea or a good link? The way I've always built Perl with specific bittiness is by specifying that the compiler is 'cc -m32' or 'cc -m64'. Just to check that it still works, I've just built Perl 5.12.1 on MacOS X 10.6.4 (released earlier this week), direct from source. It took me 3 or 4 goes to get the config right because I got return-happy and missed the questions that need a non-standard answer. /Users/jleffler/perl/v5.12.1-32bit/bin/perl: Mach-O executable i386 /Users/jleffler/perl/v5.12.1/bin/perl: Mach-O 64-bit executable x86_64 /usr/bin/perl: Mach-O universal binary with 3 architectures /usr/bin/perl (for architecture x86_64):Mach-O 64-bit executable x86_64 /usr/bin/perl (for architecture i386):Mach-O executable i386 /usr/bin/perl (for architecture ppc7400):Mach-O executable ppc The really tricky question was the one about building shared libraries - it was: What command should be used to create dynamic libraries? [env MACOSX_DEPLOYMENT_TARGET=10.3 cc] I had to add '-m32' to that by typing '$1 $2 $3 -m32'. For the rest, I ensured that the software was installed where I wanted it (/Users/jleffler/perl/v5.12.1-32bit) and almost everything else was left at default - I decline to use vfork(). It took, oh, 20 minutes to build and test - probably less; I set it running while I went swimming with the kids, and it was done long before I got back. -- Jonathan Leffler jonathan.leff...@gmail.com #include disclaimer.h Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org Blessed are we who can laugh at ourselves, for we shall never cease to be amused.