bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] CGI script prints instead of executing when FILE_IO is cop


From: alexweiner
Subject: Re: [Bug-apl] CGI script prints instead of executing when FILE_IO is copied in
Date: Thu, 24 Sep 2015 15:48:49 -0700
User-agent: Workspace Webmail 5.15.9

Thanks Jürgen, I will try that. I think I got the idea of 0 0 ⍎')COPY' from your example, and didn't really understand what it is really doing, besides not printing the result.

-Alex 

-------- Original Message --------
Subject: Re: [Bug-apl] CGI script prints instead of executing when
FILE_IO is copied in
From: Juergen Sauermann <address@hidden>
Date: Thu, September 24, 2015 3:36 am
To: address@hidden, address@hidden

Hi Alex,

on my machine the behavior is the same when FILE_IO is )COPYd or not )COPYed.
Looking at the script I would say that printing the page should be the expected behavior.

Maybe the )COPY of FILE_IO or HTML fails (and the error is hidden due to 0 0⍴⍎).

You could als try )SI instead of )OFF)COPY instead of 0 0⍴⍎')COPY', and remove --script to see
more of what's happening.

A frequent difference between CGI-scripts run from the command line or from a web server is environment
variables, PWD, and the like. Since you use a relative path in )COPY 5 HTML the result may depend on
such things. To make things explicit always use absolute paths and full file extensions.

/// Jürgen


On 09/24/2015 03:23 AM, address@hidden wrote:
Hi Bug-APL,

It appears that this script works if FILE_IO is not copied in. When the FILE_IO is copied in, it appears that the cgi script runs but prints the HTML to the page. Is FILE_IO 's existence in the program make the script run under different conditions? (or is it possible there is something wrong in the non-APL part of the CGI interaction, in which case I'll troubleshoot elsewhere.)


#!/usr/local/bin/apl --script --
0 0 ⍴ ⍎')COPY /usr/local/lib/apl/wslib5/FILE_IO.apl'
0 0 ⍴ ⍎')COPY 5 HTML'
A←⎕arg
xTITLE←'You got here!'
xDESCRIPTION←'Congrats!'
yBODY←(,¨'{}') ⎕INP 'END-OF-⎕INP'

{A}
END-OF-⎕INP
HTML∆emit HTML∆Document
)off


-Alex


 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]