Re: Strange Error

2010-09-14 Thread Patrick Galbraith

Jerry,

Hi there - I'm the maintainer of DBD::mysql

The verbiage going to your log looks like what you would see if you set 
the DBI trace level to 2 or greater. I've double-checked my code and any 
debug I print is indeed only occurring in a block where if trace is set 
to 2 or greater it would show up.


I wonder if CGI::Application might set trace? Or what about any sort of 
Apache/mod_perl startup scripts that might set it - have you checked those?


--Patrick

Jerry Kaidor wrote:

Hello,

   My name is Jerry Kaidor.  I am seeing some cryptic errors in a web
application that I'm writing.  Driving me nuts. My code runs under
CGI::Application, and uses DBI with the mysql driver.  Here is the
error message, which appears in /var/log/httpd/error_log:

- snip 

[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
RV(0x8c6212c) at 0x8c62120
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
(ROK,READONLY)
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RV = 0x8c61ef0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] PVHV(0x8c57b84)
at 0x8c61ef0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
(OBJECT,OOK,SHAREKEYS)
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   STASH = 0x8700430
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] \tDBI::db
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   ARRAY = 0x8c66878
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   KEYS = 0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FILL = 0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   MAX = 7
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RITER = -1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   EITER = 0x0

 endsnip 

   The Linux system is based on Slackware 13.0.  I have upgraded to the
latest DBI and DBD::mysql via CPAN.  The Linux kernel is 2.6.29.6-smp. 
Perl is v5.10.0 built for i486-linux-thread-multi.  The mysql server

is 5.0.84.  The webserver is Apache 2.2.13.

   I have done a fair amount of googling on this, no joy, except that the
error messages seem to be about some kind of Perl internals distress. 
I also asked the CGI::Application mailing list - they know nothing. 
One person suspected the DBD driver because it uses C code interfaced

to Perl via XS.

   Anybody have a clue?  BTW, the application seems to work fine.   I'm
just seeing this error in the httpd error log.

   Thanks in advance,

   - Jerry Kaidor ( je...@tr2.com )



  




Re: Strange Error

2010-09-04 Thread Tim Bunce
On Fri, Sep 03, 2010 at 07:35:35AM -0700, Jerry Kaidor wrote:
 Hello,
 
My name is Jerry Kaidor.  I am seeing some cryptic errors in a web
 application that I'm writing.  Driving me nuts. My code runs under
 CGI::Application, and uses DBI with the mysql driver.  Here is the
 error message, which appears in /var/log/httpd/error_log:
 
 - snip 
 
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
 RV(0x8c6212c) at 0x8c62120

There may be relevant lines above or below the ones you've quoted.
Please post them as well.

Enabling tracing (see DBI docs) would help identify what's happening
when this message (from sv_dump) is produced.

Tim.


Re: Strange Error

2010-09-04 Thread Jerry Kaidor
Hi Tim,

*** Thank you very much for your reply!

 There may be relevant lines above or below the ones you've quoted.
 Please post them as well.

 Enabling tracing (see DBI docs) would help identify what's happening
 when this message (from sv_dump) is produced.

*** The error lines I posted are all there is.  There is nothing before
them or after them.

   I have tried to bracket the problem in time by producing my own error
that I use as a mark in the apache error log.  No matter where I put
my mark error, it occurs BEFORE the problem.  So the problem is
occurring after my application finishes ALL its DBI work, and all that
remains is to spit out the HTML.

   So I suspected some kind of shutdown problem.  I added code to call
disconnect() for every single dbh in the system.  No difference :(. 
Didn't really expect one: the documentation is clear that disconnect()
is not really needed.  But I was not sorry to add it: I tend to be
suspicious of magic initializations and shutdowns - a sad effect of 20
years of embedded C programming. :)

   I will enable tracing later today and report the results.

- Jerry Kaidor




Re: Strange Error

2010-09-04 Thread Tim Bunce
On Sat, Sep 04, 2010 at 08:55:43AM -0700, Jerry Kaidor wrote:
  There may be relevant lines above or below the ones you've quoted.
  Please post them as well.
 
  Enabling tracing (see DBI docs) would help identify what's happening
  when this message (from sv_dump) is produced.
 
 *** The error lines I posted are all there is.  There is nothing before
 them or after them.

Odd.

The sv_dump output is that of a DBI handle that has no magic attached.

I have tried to bracket the problem in time by producing my own error
 that I use as a mark in the apache error log.  No matter where I put
 my mark error, it occurs BEFORE the problem.  So the problem is
 occurring after my application finishes ALL its DBI work, and all that
 remains is to spit out the HTML.

It's possibly a problem with unordered global destruction of objects.

So I suspected some kind of shutdown problem.  I added code to call
 disconnect() for every single dbh in the system.  No difference :(. 

If you're using Apache::DBI somewhere then disconnect() is probably
disabled.

Looking at the DBI.xs source, the only sv_dump() calls that are enabled
when not tracing are those that relate to invalid handles. All of those
are followed by croak()'s. So perhaps there's no other info in the log
because you're catching and discarding the exception.

If so, this may help: $SIG{__DIE__} = sub { warn @_ };
but showing you all the exceptions being thrown. It might be noisy.
It might also not work if something else messes with $SIG{__DIE__}.

I will enable tracing later today and report the results.

Neither of the two files you sent contain the sv_dump output you're
concerned about.  So I can't determine where it's coming from.

Tim.


Strange Error

2010-09-03 Thread Jerry Kaidor
Hello,

   My name is Jerry Kaidor.  I am seeing some cryptic errors in a web
application that I'm writing.  Driving me nuts. My code runs under
CGI::Application, and uses DBI with the mysql driver.  Here is the
error message, which appears in /var/log/httpd/error_log:

- snip 

[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
RV(0x8c6212c) at 0x8c62120
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
(ROK,READONLY)
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RV = 0x8c61ef0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] PVHV(0x8c57b84)
at 0x8c61ef0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
(OBJECT,OOK,SHAREKEYS)
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   STASH = 0x8700430
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] \tDBI::db
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   ARRAY = 0x8c66878
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   KEYS = 0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FILL = 0
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   MAX = 7
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RITER = -1
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
[Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   EITER = 0x0

 endsnip 

   The Linux system is based on Slackware 13.0.  I have upgraded to the
latest DBI and DBD::mysql via CPAN.  The Linux kernel is 2.6.29.6-smp. 
Perl is v5.10.0 built for i486-linux-thread-multi.  The mysql server
is 5.0.84.  The webserver is Apache 2.2.13.

   I have done a fair amount of googling on this, no joy, except that the
error messages seem to be about some kind of Perl internals distress. 
I also asked the CGI::Application mailing list - they know nothing. 
One person suspected the DBD driver because it uses C code interfaced
to Perl via XS.

   Anybody have a clue?  BTW, the application seems to work fine.   I'm
just seeing this error in the httpd error log.

   Thanks in advance,

   - Jerry Kaidor ( je...@tr2.com )





Re: Strange Error

2010-09-03 Thread John Scoles
Yep it is something on the XS side of things.

Perhaps the chap who wrote the DBD driver left in some debugging code?

Are you doing any recursive calls or queries??


On Fri, Sep 3, 2010 at 10:35 AM, Jerry Kaidor je...@tr2.com wrote:

 Hello,

   My name is Jerry Kaidor.  I am seeing some cryptic errors in a web
 application that I'm writing.  Driving me nuts. My code runs under
 CGI::Application, and uses DBI with the mysql driver.  Here is the
 error message, which appears in /var/log/httpd/error_log:

 - snip 

 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
 RV(0x8c6212c) at 0x8c62120
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
 (ROK,READONLY)
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RV = 0x8c61ef0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] PVHV(0x8c57b84)
 at 0x8c61ef0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
 (OBJECT,OOK,SHAREKEYS)
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   STASH =
 0x8700430
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] \tDBI::db
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   ARRAY =
 0x8c66878
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   KEYS = 0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FILL = 0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   MAX = 7
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RITER = -1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   EITER = 0x0

  endsnip 

   The Linux system is based on Slackware 13.0.  I have upgraded to the
 latest DBI and DBD::mysql via CPAN.  The Linux kernel is 2.6.29.6-smp.
 Perl is v5.10.0 built for i486-linux-thread-multi.  The mysql server
 is 5.0.84.  The webserver is Apache 2.2.13.

   I have done a fair amount of googling on this, no joy, except that the
 error messages seem to be about some kind of Perl internals distress.
 I also asked the CGI::Application mailing list - they know nothing.
 One person suspected the DBD driver because it uses C code interfaced
 to Perl via XS.

   Anybody have a clue?  BTW, the application seems to work fine.   I'm
 just seeing this error in the httpd error log.

   Thanks in advance,

   - Jerry Kaidor ( je...@tr2.com )





--
The best compliment you could give Pythian for our service is a referral.


Re: Strange Error

2010-09-03 Thread Jerry Kaidor
 Yep it is something on the XS side of things.

 Perhaps the chap who wrote the DBD driver left in some debugging code?
*** Where would I look for it?  All I see in DBD on my system is Perl.


 Are you doing any recursive calls or queries??

*** Not that I know of.

  I tried an experiment to localize the error in time:

sub mark
  {
  my $string = shift;
  open ( LOGFILE, /var/log/httpd/error_log );
  print LOGFILE $string;
  close LOGFILE;
  }

  Then I stuck invocations to this here and there in the code.  It didn't
really work - the apache error log complained about trying to write to a
closed file - but that was good enough for me, because THAT error wound
up in the same file as my weird errors.

   The way CGI::Application works, is you accumulate all the HTML you plan
to output in a perl scalar, and then return it to CGI::Application when
you're done.  I put a call to mark() before the very last return to
CGI::Application, and the WEIRD ERROR IS STILL AFTER THAT.  This is
interesting because at that point, my app has done ALL the DBI work,
and all that's left is for CGI::Application to pump the HTML out to the
outside world.

  Of course with multi-threading and multiple processes, things may not be
happening in the order that I think

   One possibly cogent hint I found is in the DBD::mysql documentation -
you have to be sure that Mysql, Perl and the DBD are compiled with the
same compiler.  Guy says that a lot of problems get fixed that way.  I
am reluctant to recompile all that stuff on my production server, and
will probably have to set up a second server to try it out.

   - Jerry Kaidor

















 On Fri, Sep 3, 2010 at 10:35 AM, Jerry Kaidor je...@tr2.com wrote:

 Hello,

   My name is Jerry Kaidor.  I am seeing some cryptic errors in a web
 application that I'm writing.  Driving me nuts. My code runs under
 CGI::Application, and uses DBI with the mysql driver.  Here is the
 error message, which appears in /var/log/httpd/error_log:

 - snip 

 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
 RV(0x8c6212c) at 0x8c62120
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT = 1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
 (ROK,READONLY)
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RV =
 0x8c61ef0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] SV =
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] PVHV(0x8c57b84)
 at 0x8c61ef0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   REFCNT =
 1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FLAGS =
 (OBJECT,OOK,SHAREKEYS)
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   STASH =
 0x8700430
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6] \tDBI::db
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   ARRAY =
 0x8c66878
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   KEYS = 0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   FILL = 0
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   MAX = 7
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   RITER = -1
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]
 [Fri Sep 03 07:11:35 2010] [error] [client 10.120.102.6]   EITER = 0x0

  endsnip 

   The Linux system is based on Slackware 13.0.  I have upgraded to the
 latest DBI and DBD::mysql via CPAN.  The Linux kernel is 2.6.29.6-smp.
 Perl is v5.10.0 built for i486-linux-thread-multi.  The mysql server
 is 5.0.84.  The webserver is Apache 2.2.13.

   I have done a fair amount of googling on this, no joy, except that the
 error messages seem to be about some kind of Perl internals distress.
 I also asked the CGI::Application mailing list - they know nothing.
 One person suspected the DBD driver because it uses C code interfaced
 to Perl via XS.

   Anybody have a clue?  BTW, the application seems to work fine.   I'm
 just seeing this error in the httpd error log.

   Thanks in advance,

   - Jerry Kaidor ( je...@tr2.com )





 --
 The best compliment you could give Pythian for our service is a referral.





Re: strange error with local and LongReadLen

2008-09-14 Thread Tim Bunce
On Fri, Sep 12, 2008 at 02:54:26PM +0100, Martin Evans wrote:
 Using perl 5.9.5 on Windows the following:

 perl -d -e use DBI; use strict;use warnings;my $h = DBI-connect;{local 
 $h-{LongReadLen} = 10;print hello\n;}

 outputs use of uninitialized variable in subroutine entry when stepping 
 on the statement setting LongReadLen. This does not happen in 5.8.8 on 
 Linux.

 If you remove the local all is ok.

 Any ideas why?

I'd hazard a guess that perl is storing an undef before it stores the 10.
Using trace() at a suitable level should show the STORE method calls.

Tim.


strange error with local and LongReadLen

2008-09-12 Thread Martin Evans

Using perl 5.9.5 on Windows the following:

perl -d -e use DBI; use strict;use warnings;my $h = DBI-connect;{local 
$h-{LongReadLen} = 10;print hello\n;}


outputs use of uninitialized variable in subroutine entry when 
stepping on the statement setting LongReadLen. This does not happen in 
5.8.8 on Linux.


If you remove the local all is ok.

Any ideas why?

martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com


Re: Strange error when doing insert into DB

2006-02-21 Thread Hemlata Lalwani
Hi,
   Which code do you want?Like the error says abt this path..

/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracle.pm
 So shall i give you the code of this?If not which code we want
..please tell me..

Regards,
 -Hemlata Lalwani

- Original Message -
From: Scott T. Hildreth [EMAIL PROTECTED]
To: Hemlata Lalwani [EMAIL PROTECTED]
Cc: dbi-users@perl.org
Sent: Monday, February 20, 2006 9:35 PM
Subject: Re: Strange error when doing insert into DB


 On Mon, 2006-02-20 at 21:08 +0530, Hemlata Lalwani wrote:
  Hi,
 Please give a look at below source code if this can help you:

 This is Oracle.pm code, which is not your code that is in error.
 I'm sorry if you cannot send your actual code, I can't show where
 to fix your code.

 
  package DBD::Oracle::db; # == DATABASE ==
  use strict;
 
  sub prepare {
  my($dbh, $statement, @attribs)= @_;
 
  # create a 'blank' sth
 
  my $sth = DBI::_new_sth($dbh, {
  'Statement' = $statement,
  });
 
  # Call Oracle OCI parse func in Oracle.xs file.
  # and populate internal handle data.
 
  DBD::Oracle::st::_prepare($sth, $statement, @attribs)
  or return undef;
 
  $sth;
 



  Waiting for your help..Also wud like to know how i can add myself in
this

   Go to the link below,

   http://lists.cpan.org/showlist.cgi?name=dbi-users



  list ..
 
  Regards,
   -Hemlata Lalwani
 
  - Original Message -
  From: Scott T. Hildreth [EMAIL PROTECTED]
  To: Hemlata Lalwani [EMAIL PROTECTED]
  Cc: dbi-users@perl.org
  Sent: Monday, February 20, 2006 8:59 PM
  Subject: RE: Strange error when doing insert into DB
 
 
   On Mon, 2006-02-20 at 20:05 +0530, Hemlata Lalwani wrote:
Hi,
   Iam also having the same problem..the piece of code is as
below:
  
 I'm sorry I don't know what this is referring to?
   
   
DBD::Oracle::st::_prepare($sth, $statement, @attribs)
or return undef;
  
 Are you coding it this way or is this coming from a trace?
  
 Can you post some code?
  
   
would really appreciate if you help me..
  
 I would like to help, but I need more info or code to look at.
 Also I am cc the dbi-users list, this is where these questions
 should be asked.
  
Also The error i got in my qmail logs is
   
Can't mix placeholder styles (:foo/:1) at
  
 Well you can't, I would need to see the $statemnet in order to help.
  
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracle.pm
line
293.
Which i got when i insert the mail into databse..this mail actually
bouced back...
   
Regards,
 -Hemlata Lalwani
Hemlata Lalwani | Linux Administrator ( Systems ) I Webdunia.Com
(India) Pvt Ltd | 582 MG Road Indore MP | Work +91-731-398-3426 |
Mobile +91-930-079-7948 I Fax +91-731-243-6615 | www.webdunia.net
   
   
   --
   Scott T. Hildreth [EMAIL PROTECTED]
  
 
 --
 Scott T. Hildreth [EMAIL PROTECTED]




Re: Strange error when doing insert into DB

2006-02-21 Thread Tim Bunce
On Tue, Feb 21, 2006 at 10:17:44AM +0530, Hemlata Lalwani wrote:
 Hi,
Which code do you want?Like the error says abt this path..
 
 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracle.pm
  So shall i give you the code of this?If not which code we want
 ..please tell me..

 Can't mix placeholder styles (:foo/:1) at
   
  Well you can't, I would need to see the $statemnet in order to help.

It's the SQL statement you are passing to prepare() that has the problem,
not a perl statement. Please post the SQL statement.

Tim.


RE: Strange error when doing insert into DB

2006-02-21 Thread Reidy, Ron
Send the code that you have written that throws this error.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-Original Message-
From: Hemlata Lalwani [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 20, 2006 9:48 PM
To: [EMAIL PROTECTED]
Cc: dbi-users@perl.org
Subject: Re: Strange error when doing insert into DB


Hi,
   Which code do you want?Like the error says abt this path..

/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracle.pm
 So shall i give you the code of this?If not which code we want
..please tell me..

Regards,
 -Hemlata Lalwani

- Original Message -
From: Scott T. Hildreth [EMAIL PROTECTED]
To: Hemlata Lalwani [EMAIL PROTECTED]
Cc: dbi-users@perl.org
Sent: Monday, February 20, 2006 9:35 PM
Subject: Re: Strange error when doing insert into DB


 On Mon, 2006-02-20 at 21:08 +0530, Hemlata Lalwani wrote:
  Hi,
 Please give a look at below source code if this can help you:

 This is Oracle.pm code, which is not your code that is in error.
 I'm sorry if you cannot send your actual code, I can't show where
 to fix your code.

 
  package DBD::Oracle::db; # == DATABASE ==
  use strict;
 
  sub prepare {
  my($dbh, $statement, @attribs)= @_;
 
  # create a 'blank' sth
 
  my $sth = DBI::_new_sth($dbh, {
  'Statement' = $statement,
  });
 
  # Call Oracle OCI parse func in Oracle.xs file.
  # and populate internal handle data.
 
  DBD::Oracle::st::_prepare($sth, $statement, @attribs)
  or return undef;
 
  $sth;
 



  Waiting for your help..Also wud like to know how i can add myself in
this

   Go to the link below,

   http://lists.cpan.org/showlist.cgi?name=dbi-users



  list ..
 
  Regards,
   -Hemlata Lalwani
 
  - Original Message -
  From: Scott T. Hildreth [EMAIL PROTECTED]
  To: Hemlata Lalwani [EMAIL PROTECTED]
  Cc: dbi-users@perl.org
  Sent: Monday, February 20, 2006 8:59 PM
  Subject: RE: Strange error when doing insert into DB
 
 
   On Mon, 2006-02-20 at 20:05 +0530, Hemlata Lalwani wrote:
Hi,
   Iam also having the same problem..the piece of code is as
below:
  
 I'm sorry I don't know what this is referring to?
   
   
DBD::Oracle::st::_prepare($sth, $statement, @attribs)
or return undef;
  
 Are you coding it this way or is this coming from a trace?
  
 Can you post some code?
  
   
would really appreciate if you help me..
  
 I would like to help, but I need more info or code to look at.
 Also I am cc the dbi-users list, this is where these questions
 should be asked.
  
Also The error i got in my qmail logs is
   
Can't mix placeholder styles (:foo/:1) at
  
 Well you can't, I would need to see the $statemnet in order to 
   help.
  
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracl
e.pm
line
293.
Which i got when i insert the mail into databse..this mail
actually
bouced back...
   
Regards,
 -Hemlata Lalwani
Hemlata Lalwani | Linux Administrator ( Systems ) I Webdunia.Com
(India) Pvt Ltd | 582 MG Road Indore MP | Work +91-731-398-3426 
| Mobile +91-930-079-7948 I Fax +91-731-243-6615 | 
www.webdunia.net
   
   
   --
   Scott T. Hildreth [EMAIL PROTECTED]
  
 
 --
 Scott T. Hildreth [EMAIL PROTECTED]



This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.



Re: Strange error when doing insert into DB

2006-02-20 Thread Scott T. Hildreth
On Mon, 2006-02-20 at 21:08 +0530, Hemlata Lalwani wrote:
 Hi,
Please give a look at below source code if this can help you:

This is Oracle.pm code, which is not your code that is in error.
I'm sorry if you cannot send your actual code, I can't show where
to fix your code.  

 
 package DBD::Oracle::db; # == DATABASE ==
 use strict;
 
 sub prepare {
 my($dbh, $statement, @attribs)= @_;
 
 # create a 'blank' sth
 
 my $sth = DBI::_new_sth($dbh, {
 'Statement' = $statement,
 });
 
 # Call Oracle OCI parse func in Oracle.xs file.
 # and populate internal handle data.
 
 DBD::Oracle::st::_prepare($sth, $statement, @attribs)
 or return undef;
 
 $sth;
 



 Waiting for your help..Also wud like to know how i can add myself in this

  Go to the link below,

  http://lists.cpan.org/showlist.cgi?name=dbi-users



 list ..
 
 Regards,
  -Hemlata Lalwani
 
 - Original Message -
 From: Scott T. Hildreth [EMAIL PROTECTED]
 To: Hemlata Lalwani [EMAIL PROTECTED]
 Cc: dbi-users@perl.org
 Sent: Monday, February 20, 2006 8:59 PM
 Subject: RE: Strange error when doing insert into DB
 
 
  On Mon, 2006-02-20 at 20:05 +0530, Hemlata Lalwani wrote:
   Hi,
  Iam also having the same problem..the piece of code is as
   below:
 
I'm sorry I don't know what this is referring to?
  
  
   DBD::Oracle::st::_prepare($sth, $statement, @attribs)
   or return undef;
 
Are you coding it this way or is this coming from a trace?
 
Can you post some code?
 
  
   would really appreciate if you help me..
 
I would like to help, but I need more info or code to look at.
Also I am cc the dbi-users list, this is where these questions
should be asked.
 
   Also The error i got in my qmail logs is
  
   Can't mix placeholder styles (:foo/:1) at
 
Well you can't, I would need to see the $statemnet in order to help.
 
   /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/Oracle.pm
   line
   293.
   Which i got when i insert the mail into databse..this mail actually
   bouced back...
  
   Regards,
-Hemlata Lalwani
   Hemlata Lalwani | Linux Administrator ( Systems ) I Webdunia.Com
   (India) Pvt Ltd | 582 MG Road Indore MP | Work +91-731-398-3426 |
   Mobile +91-930-079-7948 I Fax +91-731-243-6615 | www.webdunia.net
  
  
  --
  Scott T. Hildreth [EMAIL PROTECTED]
 
 
-- 
Scott T. Hildreth [EMAIL PROTECTED]


Strange Error

2004-05-07 Thread Mike Blezien
Hello,

Error Message:
DBD::mysql::st execute failed: File './mysql/user.MYD' not found (Errcode: 24)
What would be causing this type of error too occur - Too many files open ??

Thx's
--
MikemickaloBlezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Strange error using DBD::ADO

2003-02-10 Thread Jorge Lopez
Hey all,
I'm trying to use DBD::ADO in my project but one weird thing is
happening when I'm trying to execute simple SELECT statement.
 
Here is the code snippet:
 
 
my $dsn = Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=d:\\pub\\movies.db;
 my $dbh = DBI-connect( dbi:ADO:$dsn, 
  undef, undef, {RaiseError = 1,
PrintError = 1,
  AutoCommit
= 0}) || die DBI-errstr;
 
#Note: The connection is succesful
 
 my $resGenres = $dbh-prepare($query); # $query is a SELECT statement
 $resGenres-execute || die $dbh-errstr;
 my ($Genre, @Genres);
 $resGenres-bind_columns(\($Genre));
 while ($resGenres-fetch) {
  push @Genres, $Genre;
 };
 $resGenres-finish;
 
The error reads Can't locate auto/DBI/SQL_BIT.al in @INC (@INC
contains: D:/Program Files/Perl/lib D:/Program Files/Perl/site/lib .) at
D:/Program Files/Perl/site/lib/DBD/ADO.pm line 1303.
 
If I comment all instances of DBI::SQL_BIT() out in ADO.pm the error
disappears.
 
The DBD::ADO version is 2.6.
 
Any ideas why its happening and how to fight it?
 
Thanks,
Max
 
 
 
 
 

 



strange error with using $db-do

2002-06-24 Thread Reddy Thalakola

I have cron script that runs fine on a bsd machine, but returns this output
on the linux machine.

i have version 1.21 on the linux machine.

DBD::Oracle::db do failed: ORA-0: normal, successful completion (DBD
SUCCESS_WITH_INFO: OCIStmtExecute) at
/home/scripts/update/recompilestoredprocedures line 33.

here is the code:

while (my ($oname,$otype) =  $select-fetchrow_array) {

$sql = ALTER $otype $oname COMPILE;

unless ( $db-do($sql)) { ## this db statement generates the eror
$objectsnotcompiled = $objectsnotcompiled .  $oname . ' ';
}

}

Pleas email replies to me directly. thanks.




Strange error when doing insert into DB

2001-09-14 Thread Riyaad Miller - MWeb

Hi ALL

Has anyone come across the following error:
Can't mix placeholder styles (:foo/:1) at
/usr/local/lib/perl5/site_perl/DBD/Oracle.pm line 293, LOGFILE chunk
1085.

Unix OS - SunOS 5.6
Oracle - 7

The problem does multiple actions ranging from updates, insert and of course
selects from my DB.
Your help would be appreciated!
Thanks ...
Regards Riyaad.



RE: Strange error when doing insert into DB

2001-09-14 Thread Scott T. Hildreth


Can we see some code?
The error is, what it states, you are mixing placeholders.

i.e.
 $dbh-prepare(select * from foo where bar = ? and foobar = :p1);

..check the code for :string and :number mixture in a statement.


On 14-Sep-01 Riyaad Miller - MWeb wrote:
 Hi ALL
 
 Has anyone come across the following error:
 Can't mix placeholder styles (:foo/:1) at
 /usr/local/lib/perl5/site_perl/DBD/Oracle.pm line 293, LOGFILE chunk
 1085.
 
 Unix OS - SunOS 5.6
 Oracle - 7
 
 The problem does multiple actions ranging from updates, insert and of course
 selects from my DB.
 Your help would be appreciated!
 Thanks ...
 Regards Riyaad.

--
E-Mail: Scott T. Hildreth [EMAIL PROTECTED]
Date: 14-Sep-01
Time: 08:29:30
--



RE: Strange Error Can't find DBI

2001-08-08 Thread Kokarski, Anton

You need to write nother script that will dump env variables

foreach (keys %ENV) {
  print $_ : $ENV{$_}br\n;
}

and run it from the the shell and your browser. You will see the
differenceses

particularly you have to look for PERL5LIB and INC

in shell script you would run something like 
export PERL5LIB=/path:/path2:/path3


Regards,
Anton

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 08, 2001 10:05 AM
To: Jeff Seger
Cc: [EMAIL PROTECTED]
Subject: Re: Strange Error Can't find DBI


On Wed, 08 Aug 2001 12:51:53 -0400, Jeff Seger
[EMAIL PROTECTED],[EMAIL PROTECTED]
.net
wrote:

There are three things to take into account hereenvironment,
environment,
environment.
Your cron job needs to have the same environment as the web server.

something like this:

02 8 * * *  . /dw/prod/DW/Load/config/dw-env.sh;
/dw/prod/DW/Load/scripts/daily.pl

where /dw/prod/DW/Load/config/dw-env.sh  contains the environment
variables.

Jeff,

What exactly env variables need to be contain in the .sh shell script, this
is
abit beyond me here.. not fimilar with shell scripts too much.

Plus the problem arises by just executing the script at the command line,
and
not even with a cronjob:

% perl -c script_name.pl

if I execute the script(check syntax), from the command line, I get the
Error,
DBI.pm module not found, if I execute the script from the browser, it works
perfectly!!

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Re: Strange Error Can't find DBI

2001-08-08 Thread Brett W. McCoy

On Wed, 8 Aug 2001 [EMAIL PROTECTED] wrote:

 First time I've come accross this error.

 I've been working on a project user DBI/Perl and everything is working
 perfectly when executing the scripts thru the browser and access the
 database, but when I set up a cron job to cycle thru a database, when
 the script is executed at the shell command line, I keep getting the
 error, DBI.pm module can not be located!!

 What would cause the script to fail at the command line and work
 perfectly thru the browser. The DBI module is installed!

Is it possible that the DBI module is included via a mod_perl handler,
which makes it accessible via your web server, but not accessible via the
command-line?  Does it work if you do 'perl -MDBI yourscript.pl'?

-- Brett
   http://www.chapelperilous.net/btfwk/

All this time I've been VIEWING a RUSSIAN MIDGET SODOMIZE a HOUSECAT!




Re: Strange Error Can't find DBI

2001-08-08 Thread mickalo



Just wanted to say Much Thanks too all the help on this. Come to find out,
this was the problem, as noted below. If the cron is setup thru the client's web
host manager admin control panel, then the cron scripts works fine, just can't
executed from the command line, directly, thru the shell... without all kinds of
changes needed.

Again, appreciate all the input and help :)



On Wed, 8 Aug 2001 14:24:45 -0400 (EDT), Curt Russell Crandall 
[EMAIL PROTECTED]   wrote:

Are you using the same account to run the script from the command line and
the browser?  Do you perhaps have multiple instances of Perl installed or
possibly different PERL5LIB values for each account?  This is always the
case when I run into this situation... the www account that runs the web
apps will have a different PATH than the account I'm using to do command
line debugging.
`su - account` and run a perl -V to see if it is the same perl that is
running for both accounts.  If so, then do something like:

perl -e 'print $ENV{PERL5LIB}, \n'
and/or
perl -e 'print join(\n, @INC), \n'

to make sure both accounts are seeing the same library trees.

HTH
--Curt


Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




Strange Error

2001-07-28 Thread Mike Blezien

Hi All,

Sorry about the off-topic post, but the perl mailing list seems to have gone on
vacation,,...! :)

Has any seen an error like this before:

Function CGI::Object::FETCH does not exist at /path/to/script line xxx

I've never seen an error message like this before??

ThX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




A strange error ?

2001-05-14 Thread Nicolas JOURDEN

Hi,


I've got a problem from my system and i can't understand whats' happen 
now it's verry strange and i'm verry tire so :


$sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = . 
$dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 * 12) ). ') 
LIMIT 1);
print $sql. \n\n\n;
($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );


I builded my connection and I execute this part of code and it's return 
to me this :


DBD::mysql::st execute failed: Unknown column '989657745LH2719W234142M2811HQ30RX9' in 
'where clause' at lib.cgi line 91.

1 at lib.cgi line 91.


But if I execute this request using mysql bash it's works :/


For further information the structure of the table's :


CREATE TABLE user (

 session text  DEFAULT '' NOT NULL ,

 ip text,

 user_agent text,

 idaffilie int(10) unsigned   ,

 idmonaie int(10) unsigned DEFAULT '1'  ,

 idclient int(10) unsigned   ,

 date text,

 heure text,

 time int(10) unsigned  
);


So what's the problem ?


Thanks for help.


-- 

=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=
Nicolas  JOURDEN - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - #41100039 - 
+33 0681940905
http://www.wedoo.com/   - La Nouvelle Facon de Surfer...
http://ddx.wedoo.com/   - Mon site perso.
Programmeur, Integrateur  | Perl, CGI, Mysql/PostgreSQL, HTML, Design
=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=-~-=




Re: A strange error ?

2001-05-14 Thread M.W. Koskamp


- Original Message -
From: Nicolas JOURDEN [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 6:10 PM
Subject: A strange error ?


 Hi,


 I've got a problem from my system and i can't understand whats' happen
 now it's verry strange and i'm verry tire so :


 $sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = .
$dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 *
12) ). ') LIMIT 1);
 print $sql. \n\n\n;
 ($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );


Dont use $dbh-quote, but put single quotes around $sys{session}...

 $sql = (SELECT idaffilie, idmonaie FROM user WHERE session ='
$sys{session}' AND etc




Re: A strange error ?

2001-05-14 Thread M.W. Koskamp


- Original Message -
From: Sterin, Ilya [EMAIL PROTECTED]
To: 'M.W. Koskamp ' [EMAIL PROTECTED]; 'Nicolas JOURDEN '
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 7:03 PM
Subject: RE: A strange error ?




 -Original Message-
 From: M.W. Koskamp
 To: Nicolas JOURDEN; [EMAIL PROTECTED]
 Sent: 05/14/2001 11:05 AM
 Subject: Re: A strange error ?


 - Original Message -
 From: Nicolas JOURDEN [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 14, 2001 6:10 PM
 Subject: A strange error ?


  Hi,
 
 
  I've got a problem from my system and i can't understand whats' happen
  now it's verry strange and i'm verry tire so :
 
 
  $sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = .
 $dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 *
 12) ). ') LIMIT 1);
  print $sql. \n\n\n;
  ($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );
 

 Dont use $dbh-quote, but put single quotes around $sys{session}...

  $sql = (SELECT idaffilie, idmonaie FROM user WHERE session ='
 $sys{session}' AND etc

 What's the difference?  Suppost to do the same thing.

For most database yes...




RE: A strange error ?

2001-05-14 Thread Sterin, Ilya

 

-Original Message-
From: M.W. Koskamp
To: Sterin, Ilya; 'Nicolas JOURDEN '; [EMAIL PROTECTED]
Sent: 05/14/2001 11:22 AM
Subject: Re: A strange error ?


- Original Message -
From: Sterin, Ilya [EMAIL PROTECTED]
To: 'M.W. Koskamp ' [EMAIL PROTECTED]; 'Nicolas JOURDEN '
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 7:03 PM
Subject: RE: A strange error ?




 -Original Message-
 From: M.W. Koskamp
 To: Nicolas JOURDEN; [EMAIL PROTECTED]
 Sent: 05/14/2001 11:05 AM
 Subject: Re: A strange error ?


 - Original Message -
 From: Nicolas JOURDEN [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 14, 2001 6:10 PM
 Subject: A strange error ?


  Hi,
 
 
  I've got a problem from my system and i can't understand whats'
happen
  now it's verry strange and i'm verry tire so :
 
 
  $sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = .
 $dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 *
 12) ). ') LIMIT 1);
  print $sql. \n\n\n;
  ($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );
 

 Dont use $dbh-quote, but put single quotes around $sys{session}...

  $sql = (SELECT idaffilie, idmonaie FROM user WHERE session ='
 $sys{session}' AND etc

 What's the difference?  Suppost to do the same thing.

For most database yes...

And for which not?  It's still going to enclose the string in single quotes,
weather the escape characters vary per DBD or not.

Ilya Sterin



Re: A strange error ?

2001-05-14 Thread M.W. Koskamp


- Original Message -
From: Sterin, Ilya [EMAIL PROTECTED]
To: 'M.W. Koskamp ' [EMAIL PROTECTED]; ''Nicolas JOURDEN ' '
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 7:21 PM
Subject: RE: A strange error ?




 -Original Message-
 From: M.W. Koskamp
 To: Sterin, Ilya; 'Nicolas JOURDEN '; [EMAIL PROTECTED]
 Sent: 05/14/2001 11:22 AM
 Subject: Re: A strange error ?


 - Original Message -
 From: Sterin, Ilya [EMAIL PROTECTED]
 To: 'M.W. Koskamp ' [EMAIL PROTECTED]; 'Nicolas JOURDEN '
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, May 14, 2001 7:03 PM
 Subject: RE: A strange error ?


 
 
  -Original Message-
  From: M.W. Koskamp
  To: Nicolas JOURDEN; [EMAIL PROTECTED]
  Sent: 05/14/2001 11:05 AM
  Subject: Re: A strange error ?
 
 
  - Original Message -
  From: Nicolas JOURDEN [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, May 14, 2001 6:10 PM
  Subject: A strange error ?
 
 
   Hi,
  
  
   I've got a problem from my system and i can't understand whats'
 happen
   now it's verry strange and i'm verry tire so :
  
  
   $sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = .
  $dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 *
  12) ). ') LIMIT 1);
   print $sql. \n\n\n;
   ($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );
  
 
  Dont use $dbh-quote, but put single quotes around $sys{session}...
 
   $sql = (SELECT idaffilie, idmonaie FROM user WHERE session ='
  $sys{session}' AND etc
 
  What's the difference?  Suppost to do the same thing.
 
 For most database yes...

 And for which not?  It's still going to enclose the string in single
quotes,
 weather the escape characters vary per DBD or not.

Hmm, then why does Oracle think it is a column name?
Must be passes unquoted then i think...




Re: A strange error ?

2001-05-14 Thread Michael A. Chase

 If your DBD supports placeholders, you should use them.

If it does not, you should use $dbh-quote() on strings to make sure they
are properly quoted and escaped.

Just putting quotes (' or ) in the statement doesn't properly take care of
data containing those quotes.

--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: Nicolas JOURDEN [EMAIL PROTECTED]
To: Sterin, Ilya [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 10:30
Subject: Re: A strange error ?


 Sterin, Ilya wrote:

 
  -Original Message-
  From: M.W. Koskamp
  To: Nicolas JOURDEN; [EMAIL PROTECTED]
  Sent: 05/14/2001 11:05 AM
  Subject: Re: A strange error ?
 
 
  - Original Message -
  From: Nicolas JOURDEN [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, May 14, 2001 6:10 PM
  Subject: A strange error ?
 
 
  I've got a problem from my system and i can't understand whats' happen
  now it's verry strange and i'm verry tire so :
 
  $sql = (SELECT idaffilie, idmonaie FROM user WHERE (session = .
 
  $dbh-quote($sys{'session'}). ) AND (time  '. ( time() - (60 * 60 *
  12) ). ') LIMIT 1);
 
  print $sql. \n\n\n;
  ($idaffilie, $idmonaie) = $dbh-selectrow_array( $sql );
 
 
  Dont use $dbh-quote, but put single quotes around $sys{session}...

 How can y protect my values ?

 Cause if I do this

 $sth = $dbh-prepare(SELECT idaffilie, idmonaie FROM user WHERE (session
= ?) AND (time  ?) LIMIT 1);

 $rv = $sth-execute($sys{'session'}, ( time() - (60 * 60 * 12));
 I thinks about :

 $rv = $sth-execute('$sys{session}', '( time() - (60 * 60 * 12)' );
 Should work, i try curently...
 
  $sql = (SELECT idaffilie, idmonaie FROM user WHERE session ='
 
  $sys{session}' AND etc
 
  What's the difference?  Suppost to do the same thing.





Re: A strange error ?

2001-05-14 Thread M.W. Koskamp


- Original Message -
From: Sterin, Ilya [EMAIL PROTECTED]
To: 'M.W. Koskamp ' [EMAIL PROTECTED]; '''Nicolas JOURDEN ' ' '
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 8:00 PM
Subject: RE: A strange error ?


 It might be becasue $sys{'session'} is a number.  You can usually check if
 it is or not and then do the appropriate task.  I also believe that if you
 bind the value, it checks against the field type, weather to quote or not?
 Not exactly sure.


hmm, not sure either.
But he was using a sql string, no bind_param if i remember correctly.
And oracle doesn't mind if you quote a numeric value.
Maybe he should just print the sql string to see if it looks ok





RE: A strange error ?

2001-05-14 Thread Sterin, Ilya

I guess that should be the next recommendation, print to the STDOUT and then
check if that query runs in sqlplus.  Something might be happening to one of
the values where it is not interpolating into your sql string as expected,
might be just an overlooked error somewhere.

Ilya Sterin

-Original Message-
From: M.W. Koskamp
To: Sterin, Ilya; '''Nicolas JOURDEN ' ' '; [EMAIL PROTECTED]
Sent: 05/14/2001 3:37 PM
Subject: Re: A strange error ?


- Original Message -
From: Sterin, Ilya [EMAIL PROTECTED]
To: 'M.W. Koskamp ' [EMAIL PROTECTED]; '''Nicolas JOURDEN ' ' '
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 14, 2001 8:00 PM
Subject: RE: A strange error ?


 It might be becasue $sys{'session'} is a number.  You can usually
check if
 it is or not and then do the appropriate task.  I also believe that if
you
 bind the value, it checks against the field type, weather to quote or
not?
 Not exactly sure.


hmm, not sure either.
But he was using a sql string, no bind_param if i remember correctly.
And oracle doesn't mind if you quote a numeric value.
Maybe he should just print the sql string to see if it looks ok




Strange error using mod_perl/DBI

2001-03-23 Thread Perl-DBI Mailing List

Hello all,

I have the following config: Apache 1.3.19 with mod_perl 1.25 and PHP4 built 
statically into the server. I am using Perl DBI 1.14 and the MySql module 1.2215. 
(Note: this problem also existed using apache 1.3.14 and mod_perl 1.24_1)

I have a CGI script that queries a table in MySQL, after executing the script X number 
of times (sometime X=1, sometimes X=10, never consistent), I get this error in the 
apache error log:

DBD::mysql::st execute failed: MySQL server has gone away at 
/usr/local/apache/cgi-bin/query_results.cgi line 215.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() 
at /usr/lib/perl5/site_perl/5.005/i586-linux/Ap
ache/Registry.pm line 144.
[Fri Mar 23 10:01:50 2001] [error] Fri Mar 23 10:01:44 2001: Can't execute query: 
MySQL server has gone away

This also happens when I use scripts that talk to an Oracle database, on the same 
sever.

I do not even know where to look: mod_perl, DBI, DBD, or Apache itself. There hasn't 
been any new versions of DBI and DBD in a few months. The latest mod_perl and apache 
upgrades did not fix the problem.

Anyone have any ideas where to look?  I am leaning towards a problem with mod_perl, 
maybe memory corruption, but thought I'd ask here.

All my perl scripts use 'strict'. Once this error occurs, regardless of how long I 
wait, I am forced to bounce the apache server before the script will work again.

Thanks greatly for any help,
CC

p.s. Are there any mod_perl mailing lists or newsgroups out there?



Re: Strange error using mod_perl/DBI

2001-03-23 Thread Peter J. Schoenster

On 23 Mar 2001, at 10:10, Perl-DBI Mailing List wrote:

 I have the following config: Apache 1.3.19 with mod_perl 1.25 and PHP4
 built statically into the server. I am using Perl DBI 1.14 and the
 MySql module 1.2215. (Note: this problem also existed using apache
 1.3.14 and mod_perl 1.24_1)
 
 I have a CGI script that queries a table in MySQL, after executing the
 script X number of times (sometime X=1, sometimes X=10, never
 consistent), I get this error in the apache error log:
 
 DBD::mysql::st execute failed: MySQL server has gone away at
 /usr/local/apache/cgi-bin/query_results.cgi line 215. Issuing

Umm... the only time I really got that error was when mysql really 
went away :) ... it's been a long time since I've seen it.  I program 
using mod_perl and all the work is always done in modules ... 
when a cgi script is used it is only used to route to the proper 
module.

You say it happens with Oracle as well. I would look at your script. 
Perhaps you are disconnecting instead of finishing and then trying 
to connect again ... Are you using Apache::DBI ?

 p.s. Are there any mod_perl mailing lists or newsgroups out there?

mod_perl here:

http://perl.apache.org/

Here is a great guide to mod_perl:

http://perl.apache.org/guide/index.html

Mailing lists and info:

http://perl.apache.org/#maillists

Peter
ps very active and helpful mod_perl list see above




---
"Reality is that which, when you stop believing in it, doesn't go
away".
-- Philip K. Dick



Strange error message with DBI (any driver) and Perl 5.6.0+

2001-02-10 Thread Dave Rolsky

I get a slew of these messages when my code finishes running, but only
when using Perl 5.6.0 (I also tried 5.6.1 trial1).

Here's a sample:

SV = RV(0x844c874) at 0x844eb94
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x8458ae4
(in cleanup) dbih_getcom handle 'DBI::db=HASH(0x8458ae4)' is not a
DBI handle (has no magic) during global destruction.
SV = RV(0x845d8b8) at 0xb638
  REFCNT = 1
  FLAGS = (ROK,READONLY)
  RV = 0x8458ae4
SV = RV(0x844c86c) at 0x844ec48
  REFCNT = 1
  FLAGS = (ROK)
  RV = 0x844ec54
(in cleanup) dbih_getcom handle 'DBI::dr=HASH(0x844ec54)' is not a
DBI handle (has no magic) during global destruction.
SV = RV(0x844c850) at 0xb338
  REFCNT = 1
  FLAGS = (ROK,READONLY)
  RV = 0x844ec54

I get one such pair ('DBI::db'  'DBI::dr') for each database handle
created by Alzabo.

Turning on tracing just before the end of the app yielded only this (at
trace level 9):

- DESTROY for DBD::mysql::db (DBI::db=HASH(0x8457cd8)~INNER)
- DESTROY= undef during global destruction.

This is not affecting the code but since Alzabo is being used by others
I'd like to get this cleaned up.  I've tried various things such as
disconnecting the database handle earlier or later, explicitly undef'ing
it, etc.  None of this works.

I emailed about this about 3 weeks ago but didn't get any responses, which
may be because my subject line was not very useful.


-dave

/*==
www.urth.org
We await the New Sun
==*/





Re: Strange error message with DBI (any driver) and Perl 5.6.0+

2001-02-10 Thread Dave Rolsky

On Sun, 11 Feb 2001, Dave Rolsky wrote:

 I get a slew of these messages when my code finishes running, but only
 when using Perl 5.6.0 (I also tried 5.6.1 trial1).

So I finally tracked this down to a DBI handle passing through Storable's
dclone function.  I made this not happen and the messages went away.


-dave

/*==
www.urth.org
We await the New Sun
==*/




strange error from dbi-oracle

2001-02-08 Thread Mickey Mestel

hi,

i'm on perl5 (5.0 patchlevel 5 subversion 2), dbi 1.13, dbd oracle 1.03,
oracle 8.1.5, solaris for intel.

i am up and running fine, connecting to 8.1.5 and 8.1.6 engines.  when i
try to connect to an 8.1.7 engine, i'm getting the following error, somewhat
randomly, i.e. it comes in the same place for a specific query, but
different places in different queries.  1 query might return with 10 rows
before the error, another may return 100.

ORA-03120: two-task conversion routine: integer overflow

this seems like a definite version thing, an internal value that was an int
is something bigger now, but just wanted to see if anyone else has seen
this.

we are working on getting 8.1.6, (8.1.7 isn't available for the intel
platform), and will have to go from there.

also, how can you find out the dbi and dbd version in an installed system?

thanks,

mickm

BayGate, Inc.
539 Bryant St. # 400
San Francisco, CA 94107
Phone: 415.908.3944
Fax: 415.908.3945
www.baygate.com




Re: strange error from dbi-oracle

2001-02-08 Thread Tony Foiani

 "Mickey" == Mickey Mestel [EMAIL PROTECTED] writes:

Mickey also, how can you find out the dbi and dbd version in an
Mickey installed system?

There are probably better ways (investigate CPAN::shell, for
instance), but this does the trick:

| $ perl -le 'for (@ARGV) { eval "require $_"; $v = "\$$_\:\:VERSION"; print 
|"$v=",eval($v); }' DBI DBD::Oracle
| $DBI::VERSION=1.14
| $DBD::Oracle::VERSION=1.06

t.