"Andrew M. Langmead" <[EMAIL PROTECTED]>

01/21/2004 05:20 PM

 
        To:     Ranga Nathan <[EMAIL PROTECTED]>
        cc:     [EMAIL PROTECTED]
        Subject:        Re: [Boston.pm] CGI problems


On Wed, Jan 21, 2004 at 04:24:45PM -0800, Ranga Nathan wrote:
> Thanks for that. I created a .perldb for 'nobody' in home directory and 
> added the '-d'  on the shebang line. The script hung but I could not 
> 'locate' a db.out anyhwere. Perhaps it closes only if the script 
finishes!

(Why does "nobody" have a home directory? That's odd, and maybe a
little scary.)

For testing purposes, I created a  /home/nobody. It was not there. Agree 
it should not be there.

As a quick glance at perl5db.pl, it seems that the LineInfo directive
will just make a quick effort to open the file. On failure it will just
merrily go its way. The recipe as written will write the db.out file into
the current directory, which "nobody" may not (and probably should not)
have write access to.  The LineInfo filehandle  is set  command buffer
its output, so it should be able to be used even on a CGI script that
just hangs and never completes.

Changing the  LineInfo directive to a full path to a directory nobody
can write to (like /tmp/db.out) might be all that you need.

Otherwise, maybe a more complex wrapper script, like the one below,
around your CGI might work.

#!/usr/local/perl/5.8.1/bin/perl -w
chdir('/tmp');
$ENV{PERLDB_OPTS}='NonStop=1 LineInfo=db.out AutoTrace';
system('/usr/local/perl/5.8.1/bin/perl', '-dw', 
    '/home/langmead/public_html/arthur.cgi');

Will try this. Thanks.
-- 
"Jumping is a lot like flying, except the sudden fall at the end."
-- Samantha Langmead, age 6.



_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to