It's a cgi script that's need the information from a web form. So it's not used to run under command line. Is there a similar way to strace under the cgi calling?
----- Original Message ----- From: "Cees Hek" <[EMAIL PROTECTED]> To: "Anya" <[EMAIL PROTECTED]> Cc: "Harald Joerg" <[EMAIL PROTECTED]>; <[email protected]> Sent: Tuesday, July 05, 2005 10:23 PM Subject: Re: [Templates] very strange Template->new behave Does the program actually exit when you run it from the command line? Or does it hang? Does use strict and use warnings give anything (if they are not being used already). If you can't get an error out of perl, then I would try strace on the process: strace perl prog.pl That may give you a hint what the process is doing when it dies or hangs. This is assuming you are using Unix. I don't know if there is an equivalent in Windows. Cheers, Cees On 7/5/05, Anya <[EMAIL PROTECTED]> wrote: > What's strange is it doesn't write any error message to the server log file. > It just doesn't go through the Template->new method and nothing returned > even without any error message. > > And the same subroutine works in the same server for other cgi scripts > except this one(with https request to another server). > > I'm extremely confused. > > > ----- Original Message ----- > From: "Harald Joerg" <[EMAIL PROTECTED]> > To: "Anya" <[EMAIL PROTECTED]> > Cc: <[email protected]> > Sent: Tuesday, July 05, 2005 3:43 PM > Subject: Re: [Templates] very strange Template->new behave > > > > Anya writes: > > > > > I have a strange problem on Template->new() method on Template > > > Toolkit in a cgi script. > > > > > > The program just stops at Template->new() instead of creating a new > > > object. Could anybody give me some clues on how to resolve it? > > > > > > [...] > > > print 'before creating Template->new'; > > > my $tt = Template->new({INTERPOLATE => 1, > > > INCLUDE_PATH => ["$root/cgi-bin"]}) > > > || die "$Template::ERROR\n"; > > > print 'after creating Template->new'; > > > [...] > > > it stops at my $tt.....; and no error message shows. > > > > Strange indeed since Template->new is pretty straightforward. > > > > Maybe STDERR ends where you didn't find it so far? 'print' goes to > > STDOUT, but 'die' writes to STDERR.... > > > > Did you look into the server's logfile? > > > > Can you run the CGI program from the command line? If so, you could > > venture to trace into the Template creation procedure. > > -- > > Cheers, > > haj > > > > _______________________________________________ > > templates mailing list > > [email protected] > > http://lists.template-toolkit.org/mailman/listinfo/templates > > > > > > > _______________________________________________ > templates mailing list > [email protected] > http://lists.template-toolkit.org/mailman/listinfo/templates > _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
