[Top][All Lists]

[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: Juergen Sauermann
Subject: Re: [Bug-apl] CGI script prints instead of executing when FILE_IO is copied in
Date: Thu, 24 Sep 2015 12:36:31 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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'
xTITLE←'You got here!'
yBODY←(,¨'{}') ⎕INP 'END-OF-⎕INP'

HTML∆emit HTML∆Document



reply via email to

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