On 11 Apr 2013, at 00:17, J. Landman Gay <jac...@hyperactivesw.com> wrote:

> Wrapping up my recent move to a different 32-bit server, there's one issue 
> left. Linux gurus, can you help?
> 
> CGI text-based scripts are now working correctly except for an issue I can't 
> identify. When writing to a log file, a server 500 error occurs immediately 
> after the write. Here's a test script:
> 
> #!rev -ui
> 
> on startup
>  open file "log.txt" for append
>  write "this is a test" & cr to file "log.txt"
>  close file "log.txt"
>  put "Content-Type: text/plain" & cr
>  put "done writing"
> end startup
> 
> When called from a browser, the entry is written to the log file and a 500 
> error is reported. "done writing" never appears.


Does it make a difference if you put another cr after the header? 

on startup
 open file "log.txt" for append
 write "this is a test" & cr to file "log.txt"
 close file "log.txt"
 put "Content-Type: text/plain" & cr
 put cr
 put "done writing"
end startup

Dave



_______________________________________________
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