I've found that if you run a LiveCode script with a shebang line as a cgi 
script, the LiveCode Server process does not terminate (even with a quit 
command).

I ran this simple script:

        #!<full path to>/livecode-server

        set the outputLineEndings to "lf"
        put "Content-type: text/html" & crlf & crlf
        put "<p>Hello from a LiveCodeServer CGI script</p>" & return
        quit

It runs successfully from the command line:

        $ ./livecode.cgi
        Content-type: text/html

        <p>Hello from a LiveCodeServer CGI script</p> 

When I run the script as a CGI the LiveCode Server process does not end and has 
to be cancelled.

I was using LiveCode Server 6.6.1 on OS X 10.9.4

If somebody can confirm this I will submit a bug report.

Regards

Peter

On 16 Jul 2014, at 16:35, Peter W A Wood <peterwaw...@gmail.com> wrote:

> Hi Monte
> 
> Many thanks. I updated to LiveCode Server 6.6.1 and then Shebang line is no 
> longer printed. It also seems the the enclosing <?lc ... ?> are no longer 
> required.
> 
> The script successfully runs at the command line.
> 
> I still have a bit more investigation to in getting in to run as a CGI.
> 
> Cheers
> 
> Peter
> 
> On 16 Jul 2014, at 09:46, Monte Goulding <mo...@sweattechnologies.com> wrote:
> 
>> Hi Peter
>> 
>> One of the contributions I made just prior to christmas was to handle the 
>> shebang and basically put the script into <?lc mode immediately if there's a 
>> shebang. I really didn't get much of a chance to experiment with it but it 
>> was merged in. Unfortunately I can't remember which version of LC but 
>> perhaps try one of the latest server versions???
>> 
>> Cheers
>> 
>> Monte
>> 
>> --
>> M E R Goulding 
>> Software development services
>> Bespoke application development for vertical markets
>> 
>> mergExt - There's an external for that!
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to