logo       

Re: [Boston.pm] CGI problems: msg#00069

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.)

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');

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe