Can't retrieve a text file from a remote CGI folder

J. Landman Gay jacque at hyperactivesw.com
Wed Apr 10 19:17:38 EDT 2013


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.

If I log in via ssh and run the script, there are no errors and it works 
fine. I see "done writing" in the console.

In a stack on my Mac, if I use "get url" to try to retrieve the content 
of the log file, it returns a 500 error. The same script correctly 
returns any other file content on the site as long as it isn't in the 
CGI folder. This returns a 500 error:

put url "http://name:password@hyperactivesw.com/cgi-bin/log.txt"

With ssh, I can read the text file just fine using "less".

I have a subdomain that also has a cgi-bin folder. Retrieving a text 
file from there works fine with "get url". It has the same permissions 
as the home cgi-bin folder, as do all their respective files. Everything 
is 755.

Ideas? The scripts have been working fine for years, so the problem 
isn't in the code. It has to be in the server setup but I don't know 
enough about it to guess.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list