Re: Apache::DBI "connection lost contact" error

2013-05-30 Thread Xinhuan Zheng
The db handle is declared local and once it's out of scope, the destroy call will disconnect. But it appears even though variable is out of scope, we still get that error. Don't know why. - xinhuan On 5/30/13 8:31 AM, "Jim Schueler" wrote: >Did this solve your problem? > > -Jim > >On Wed, 29 Ma

RE: Help on debugging print problem

2013-05-30 Thread Chris Faust
Oh, I thought the header info had to be included in the length as well. No luck there though, same Corrupted Content error. Really wish I knew what could be causing it, no problem with the same code on 4 other machines and 3 of them are the same exact apache, mod_perl and libapreq2 versions.

Re: Help on debugging print problem

2013-05-30 Thread Marcus Don
I suspect you can just to this... my $size = -s '/report.pdf'; ... but to be honest I haven't used Perl in years :) BTW It would be a lot more efficient to stream the file contents rather than read it into a variable. Marcus On 30 May 2013, at 16:54, "Chris Faust" wrote: > Thanks Marcus

RE: Help on debugging print problem

2013-05-30 Thread Chris Faust
Thanks Marcus, is there is a easy way to get the content length? I tried $length = calculate_body_len(); $r->err_headers_out->add('Content-Length' => $length); Which gave me a corrupted content error, I also tried my $body_len = calculate_body_len(); $r->set_content_length($body_l

Re: Errors building mod_perl on 64 bit perl Solaris

2013-05-30 Thread John D Groenveld
In message , Kartik Vashishta writes: >perl was built with the same compiler as mod_perl >./Configure -ders -Dcc=cc -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= >-Uloclibpth= -Duse64bitint -Duse64bitall -Ud_strerror_r -Ud_signbit >-Duselargefiles -Dprefix=/usr/perl6/5.18.0 config_args='-Dprefi

Re: Help on debugging print problem

2013-05-30 Thread Marcus Don
At a guess, I'd say your new machine is using chunked output, so you might need to add a size header. Marcus On 30 May 2013, at 12:11, "Chris Faust" wrote: > Hi, > > I have some code I use all the time I use to download a file: > > if (-e '/report.pdf') { > open(PDF, '/rep

Re: Apache::DBI "connection lost contact" error

2013-05-30 Thread Jim Schueler
Did this solve your problem? -Jim On Wed, 29 May 2013, Perrin Harkins wrote: Hi, Apache::DBI is supposed to skip caching if you connect during startup.  You should just need to disconnect your database handle after you finish with it.  It sounds like you're opening it and then leaving it open

Help on debugging print problem

2013-05-30 Thread Chris Faust
Hi, I have some code I use all the time I use to download a file: if (-e '/report.pdf') { open(PDF, '/report.pdf') or die "could not open PDF $!"; binmode PDF; my $output = do { local $/; }; close(PDF); $r

Re: Errors building mod_perl on 64 bit perl Solaris

2013-05-30 Thread Kartik Vashishta
perl was built with the same compiler as mod_perl ./Configure -ders -Dcc=cc -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Duse64bitint -Duse64bitall -Ud_strerror_r -Ud_signbit -Duselargefiles -Dprefix=/usr/perl6/5.18.0 apache was built from sources.probably used gccnot sure