Learning CGI - Woes

Bob Cole bobcole at earthlink.net
Tue Aug 10 19:28:50 EDT 2010


On August 4th there was a lot of chatter SQL queries and logins going across 
the network and what a bad idea that is.  There was discussion about CGIs and
Jacque's tutorial and other resources that I have now studied. I know I have 
followed the steps (many times) but I can't get the Hello World script to work! 
Here is my set up:
- I am using Mac OS X 10.6.4 and Web Sharing is on.
- I put copied the script from Jacque's tutorial into BBEdit, 
  saved it with Unix line endings (LF) and Unicode (UTF-8):
	#!revolution -ui

	on startup
	  put "Content-type: text/plain" & cr & cr	
	  put "Hello World!"
	end startup
- I put this hello.cgi file into the /Library/WebServer/CGI-Executables folder.
- I copied the standalone to the CGI-Executables folder from:
   /Applications/Revolution Enterprise/4.0.0-gm-1/Runtime/Mac OS \
   X/x86-32/Standalone.app/Contents/MacOS/Standalone

- I renamed it as revolution
- I used chmod 755 on both hello.cgi and revolution
- I call the script from FireFox 3.6.8 with 
  http://localhost/cgi-bin/hello.cgi

- In the browser I see:
	Internal Server Error [...snip...]

- In the console I see:
[Tue Aug 10 17:56:16 2010] [error] [client ::1] Tue Aug 10 17:56:16 \
 myMac.local revolution[1589] <Error>: kCGErrorFailure: Set a breakpoint @ \
 CGErrorBreakpoint() to catch errors as they are logged.
[Tue Aug 10 17:56:16 2010] [error] [client ::1] Premature end of script \
 headers: hello.cgi

I used the Terminal and ran: ./revolution ./hello.cgi but there is no output

Nothing works. What am I missing? Do I have to modify httpd.conf?

I put a simple perl script in the cgi-bin folder and it runs fine.  
I even tried some php scripts and they run ok from the cgi-bin folder, too.

Any help would be appreciated!
Bob




More information about the use-livecode mailing list