I guess it raise error inside the catch block. And the catch block is executed
because there is error in the try block. Is the verb stdout defined? Insert
lines like
(<'/tmp/err1') 1!:3~ LF,~ ": 4!:0 <'stdout'
before the try block to confirm verbs/nouns are defined.
HTH
Joey K Tuttle wrote:
I have a Linux (Fedora - Linux version 2.6.22.9-61.fc6) system that has
been working beautifully with J601. Yesterday I installed J602 and
tested that things worked ok for all the reports and tasks that get run
via jconsole.
However, I have several Apache CGI scripts that fail now that they call
J602 instead of J601... I'm including some sample scripts that make the
change explicit and are almost as simple as possible to illustrate my
problem. I say "almost as simple" because they do include an error trap
that is used by all my CGI scripts and the reason for including that is
to say that while both the scripts (and the real ones too) work just
fine in a terminal window when called manually (as shown below), only
the first one works from a browser.
For script t601, the browser dutifully reports "Using J601 - Can you see
me now?" but a browser asking for t602 gets a server side (Apache)
error. The Apache error_log says -
Sat Jun 07 11:27:06 2008] [error] [client 10.1.1.110] malformed header
from script. Bad header=|domain error: t602
My problem/question is --- I can't figure out what might have caused the
"domain error" that wasn't trapped (actually the reason I say it wasn't
trapped is that in my "real scripts" a trapped error is logged to a
server side error file, and that isn't happening).
The only thing I can think of is some subtle change in the way the first
lines of the shell script are interpreted in j601 versus j602....
Help? Anyone??
- joey
Scripts and tests (sorry about the long lines!)
-----
[EMAIL PROTECTED] cgi]$ cat t601
#! /usr/local/lib/j601/jconsole
3 : 0 ARGV
try.
stdout 'Content-type: text/html',(10 10{a.),'<html><head><title>Mt
Vernon Terminal Prices</title><body bgcolor=white> Using J601 - Can you
see me now? </body> </html>', 10{a.
catch.
errs =: 'Sorry - an error has occurred in ',(;1{y), ' - Even though
you may find the following message',NL
errs =: errs, '<br> inscrutable, it may help to read it. If not,
contact [EMAIL PROTECTED]',NL
errs =: errs, '<br><br>', (13!:12 ''), NL
stdout 'Content-type: text/html',(10 10{a.),'<html><head><title>Mt
Vernon Terminal Prices</title><body bgcolor=white> ', errs, ' </body>
</html>'
end.
exit 0
)
[EMAIL PROTECTED] cgi]$ cat t602
#! /usr/local/lib/j602/bin/jconsole
3 : 0 ARGV
try.
stdout 'Content-type: text/html',(10 10{a.),'<html><head><title>Mt
Vernon Terminal Prices</title><body bgcolor=white> Using J602 - Can you
see me now? </body> </html>', 10{a.
catch.
errs =: 'Sorry - an error has occurred in ',(;1{y), ' - Even though
you may find the following message',NL
errs =: errs, '<br> inscrutable, it may help to read it. If not,
contact [EMAIL PROTECTED]',NL
errs =: errs, '<br><br>', (13!:12 ''), NL
stdout 'Content-type: text/html',(10 10{a.),'<html><head><title>Mt
Vernon Terminal Prices</title><body bgcolor=white> ', errs, ' </body>
</html>'
end.
exit 0
)
[EMAIL PROTECTED] cgi]$ ./t601
Content-type: text/html
<html><head><title>Mt Vernon Terminal Prices</title><body bgcolor=white>
Using J601 - Can you see me now? </body> </html>
[EMAIL PROTECTED] cgi]$ ./t602
Content-type: text/html
<html><head><title>Mt Vernon Terminal Prices</title><body bgcolor=white>
Using J602 - Can you see me now? </body> </html>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm