[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possible breakage in HTTP::Date or Time::Local



On Fri, Aug 24, 2007 at 07:49:49PM -0700, Don Armstrong wrote:
> On Fri, 24 Aug 2007, Roberto C. Sánchez wrote:
> > I have a script that I wrote earlier this year that logs into my Vonage
> > account and downloads my call history and inserts it into a local
> > database.  When I upgraded my machine from Sarge to Etch, the script
> > broke.  The error messages I see are like so:
> > 
> > $ vonage-calls.pl -v
> > Connecting to database...
> > Getting login screen...
> > Submitting form...
> > Day too big - 38605 > 24855
> > Sec too small - 38605 < 74752
> > Sec too big - 38605 > 11647
> 
> This seems to be something calling Time::Local with an abiguous time
> and it is outside of the range of sane dates.
> 
> I'm not totally sure what is calling timegm which results in these
> days, but it's probably invalid; you could easily use the debugger to
> do a stack trace of whatever is calling Time::Local::timegm().
> 
I am still a relative Perl newbie, so I don't know anything about the
debugger.  I will investigate and try and report back on this.  If you
have a link that will help me get started on this, I would appreciate
it.

> > Sleeping...
> > Getting call details page...
> > Adding call 11856261279 to the database...
> > ERROR:  syntax error at or near "$2" at character 119
> > (Repeat these last two lines for each individual call)
> 
> The above is the actual error; without actually seeing the bind params
> you're executing it's hard to say what exactly is going wrong.
>  
OK.  I made the output more verbose (obviously the phone number is
obfuscated):

Adding call 11856261279 to the database...
        Using values: 11856261279, Aug 24, 2007 06:30 PM, , 10000000000, Voicemail, 00:01:00
ERROR:  syntax error at or near "$2" at character 119
Adding call 11737357630 to the database...
        Using values: 11737357630, Aug 17, 2007 10:56 PM, , 10000000000, Voicemail, 00:01:00
ERROR:  prepared statement "dbdpg_1" does not exist

The statement that produces that output is:

print "Adding call $trans_id to the database...\n\tUsing values: $trans_id, $date $time, $caller, $from, $to, $duration\n" if $opt_v;
$sth->execute($trans_id, $date . " " . $time, $caller, $from, $to, $duration);

Regards,

-Roberto
-- 
Roberto C. Sánchez
http://people.connexer.com/~roberto
http://www.connexer.com

Attachment: signature.asc
Description: Digital signature


Reply to: