$dbh->ping() not pinging?

2003-01-04 Thread Ask Bjoern Hansen

Without the extra ping (see the line following the XXX comment) this
program fails on the second "select ..." with 

"DBD::mysql::db selectrow_array failed: Lost connection to MySQL server during query 
at dbitest line 19."

Why do I need to ping twice?

I am using perl 5.6.1, DBI 1.21 and DBD::mysql 2.1011.

I also tried upgrading DBI to 1.32 and DBD::mysql to 2.1022; but it
didn't change anything.


 - ask


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

my $dbh_cache;
sub db_open {
  ## XXX - add an extra ping so the second ping will work properly!
  #$dbh_cache and $dbh_cache->ping;
  return $dbh_cache if $dbh_cache and $dbh_cache->ping;
  return $dbh_cache = DBI->connect("dbi:mysql:cswwwdata;user=root")
}

my $dbh = db_open();
my $thread_id = $dbh->{'mysql_thread_id'};
my ($count) = $dbh->selectrow_array(q[select count(*) from cities]);
system(qq[mysqladmin -uroot kill $thread_id]);

$dbh = db_open();
($count) = $dbh->selectrow_array(q[select count(*) from cities]);

1;

-- 
ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();



Re: [netlabs #64] Re: How to install DBI for Oracle

2001-11-02 Thread Ask Bjoern Hansen

On Thu, 1 Nov 2001, Ivan Kavuma wrote:

> I am developing an Intranet for my company.  We have an oracle
> database version 8i running on another Linux machine.  which I
> want to use as a backborn.

Please don't cc the list-owner on mails to the mailinglists.


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();





Re: Fwd: failure notice

2001-09-14 Thread Ask Bjoern Hansen

On Fri, 14 Sep 2001, Gary Traffanstedt wrote:

> 
>   I just tried to join the dbi-users list and received the following 
> message... could someone manually add me or tell me how to correctly sign 
> myself up?
> 
> <mailto:[EMAIL PROTECTED]>:
> Sorry, no mailbox here by that name. (#5.1.1)

try the address "[EMAIL PROTECTED]" instead of
"mailto:[EMAIL PROTECTED]";.


  - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();





Re: (Fwd) Anyone else experiencing problems with the dbi-* mailinglists?

2001-06-07 Thread Ask Bjoern Hansen

On Thu, 7 Jun 2001, Tim Bunce wrote:

[...]
> Is there a problem with the [EMAIL PROTECTED], [EMAIL PROTECTED], and
> [EMAIL PROTECTED] mailing lists? I seem to be experiencing sporadic
> delivery problems.

Your network is blocking connections from the perl.org
mailhost. archive.develooper.com (and www.perl.org and others) are on
the same box.

host -t mx alderaan.gsfc.nasa.gov
alderaan.gsfc.nasa.gov mail is handled (pri=0) by alderaan.gsfc.nasa.gov

$ telnet alderaan.gsfc.nasa.gov 25
Trying 128.183.16.213...
...

(times out).

# /var/qmail/bin/qmail-qread | grep -v done | grep alderaan.gsfc.nasa.gov| wc -l
 412

(from the last week alone)

Curiously enough there are 9 mails that made it through.

a traceroute from a nearby network which might help your network
administrator fix the problem:

  Matt's traceroute  [v0.42]
lux.valueclick.comThu Jun  7 16:05:23 2001
Keys:  D - Display modeR - Restart statisticsQ - Quit
  Packets   Pings
Hostname   %Loss  Rcv  Snt  Last Best  Avg  Worst
 1. 216.246.96.1  0%66 101  1
 2. 209.85.223.49 0%66 446 13
 3. hood-msfc-p1.softaware.com0%66 448 11
 4. gigaethernet1-0.lee-12000.0%66 446 12
 5. 500.POS3-1.GW6.LAX4.ALTER.0%66 558 21
 6. 169.ATM2-0.XR2.LAX4.ALTER.0%66 557 16
 7. 192.ATM2-0.TR2.LAX2.ALTER.0%66 558 23
 8. 111.at-6-1-0.TR4.SCL1.ALTE0%6624   17   21 30
 9. 399.ATM6-0.XR2.SJC1.ALTER.0%6616   16   19 30
10. 192.ATM5-0.BR2.SJC1.ALTER.0%6618   18   20 32
11. 192.150.31.29 0%6614   14   18 30
12. 128.161.3.94  0%6615   14   56226
13. s-GSFC12-ATM.NSN.NASA.GOV 0%5576   75   78 86
14. rtr-wan1-ef.gsfc.nasa.gov 0%5577   77   82 88
15. vlan910-csr2.gsfc.nasa.gov0%5586   77   83 86
16. rtr-b2-cat5.gsfc.nasa.gov 0%5581   78   84 95
17. 128.161.3.94100%05 000  0


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();





Re: ISA inheritance vs. DBI?

2001-05-21 Thread Ask Bjoern Hansen

On Mon, 21 May 2001, Paul D. Smith wrote:

[...]
> I'm quite familiar with the reply-to munging arguments, and I fully
> subscribe to the side of the fence that condemns reply-to munging, I
> don't want that setting changed.
> 
> My comment was that I was receiving two copies of the mail where the
> first one was addressed to me only, without the list in the Cc: line
> anywhere.  It looked exactly like a private message.  I replied to it,
> only to the sender of course since that was the only address in the
> headers.
> 
> Then an hour later, I would get a copy via the list as well with more
> headers than the first copy.

Ah, forward the mails in question with full headers to [EMAIL PROTECTED]
and I'll take a look. It sounds like a borken MUA somewhere else.
 
> I'm on a _LOT_ of mailing lists and this is the first time I've seen
> anything like that.  I use Emacs VM and Gnus to read my mail; I know
> it's not a puny MUA problem :).

:-)

 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();





Re: ISA inheritance vs. DBI?

2001-05-21 Thread Ask Bjoern Hansen

On Mon, 21 May 2001, Tim Bunce wrote:

> > > This is annoying; that's twice today I've received a private email from
> > > someone on the list, with just me in the headers, only to have it show
> > > up later with _both_ me _and_ the rest of the list in the headers.

[ assuming we talk about Reply-To munging ]

Even the simplest of email filtering systems should be able to
filter that. Either into a separate box, and/or filter duplicate
messages.

> > > Is this a "feature" of the dbi-users list somehow? 

Yes, and it's not going away.  
http://www.unicom.com/pw/reply-to-harmful.html

IIRC the new versions of the email RFC's are also explicit about not
doing that kind of non-sense. :-)

> > You have to choose reply all, to get it in the mailing list cause hitting
> > reply only, will send it to just the private email adress. 

Remember that someone doing that by mistake is in much better shape
than the guy next door who by mistake sends a useless mail to more
than 1500 people.

> > After that you will receive it twice... One from the mailing
> > list and one from your private email.

Aside from the fact that some people like that then for example this
.procmailrc rule can fix it. Surely your mail server and/or mail
user agent must have similar functionality,

# delete duplicates
:0 Wh: msgid.lock
| formail -D 16384 .msgid.cache

# match mails with [EMAIL PROTECTED] in any recipient field.
:0:
* ^[EMAIL PROTECTED]

Anyway, please read the
http://www.unicom.com/pw/reply-to-harmful.html document. Then you're
welcome to come back for a Holy War; but it's not all that likely
that the list settings are going to change.


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();






Re: Fwd: RE: please remove me as well

2001-02-21 Thread Ask Bjoern Hansen

On Wed, 21 Feb 2001, 'Elaine -HFB- Ashton' wrote:

And before anyone thinks badly of us poor people running the lists;
Mr. Charnley did not send any mails to [EMAIL PROTECTED]
Maybe he used an address on one of the old domains, I don't know.

Also, about twice per month or so someone writes to the owner
address of one of the many lists at perl.org because they can't
subscribe or unsubscribe. It has every time been because there was
something wrong with the users mail setup. But we are happy to help
with figuring it out. :)

-- 
ask bjoern hansen - <http://ask.netcetera.dk/>
more than 70M impressions per day, <http://valueclick.com>





RE: please remove me as well

2001-02-21 Thread Ask Bjoern Hansen

On Wed, 21 Feb 2001, Charnley, Chip (C.) wrote:

> That makes three of us. I have never been so disgusted with a list in my
> life. IMNSHO, the management of this list, since it was moved, SUCKS!
> 
> To be honest, I am so sick and tired of getting these unwanted emails, I
> have seriously considered creating a SPAM generator to SPAM this list to
> death until someone becomes responsible and takes me off the list.

Why not just unsubscribe (as you eventually did)? 

If you have problems with a list, listname-help@domain and
listname-owner@domain are usually most helpful. For this list for
example it's [EMAIL PROTECTED] and [EMAIL PROTECTED]

Also have a look at http://dev.perl.org/lists-faq

 - ask

-- 
ask bjoern hansen - <http://ask.netcetera.dk/>
more than 70M impressions per day, <http://valueclick.com>




Re: DBD install Q!

2001-01-30 Thread Ask Bjoern Hansen

On Tue, 30 Jan 2001, TIBA, LIVIA wrote:

> When I try to run in ppm install for DBI (for eg.) it gaves me the
> message:
> --
> PPM> install Dbi-1.14
> Error installing package 'Dbi-1.14': Could not locate a PPD file for
>
> What is the point?

it's DBI (all uppercase).


 - ask

-- 
ask bjoern hansen - http://ask.netcetera.dk/