Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Simple cgi problem

 [1/5] from: louisaturk:eudoramail at: 2-Jan-2002 1:03


-- Unable to decode HTML file!! --

 [2/5] from: louisaturk::coxinet::net at: 2-Jan-2002 2:50


Happy New Years everybody! How would you like to start the year off with a nice easy (I hope) to solve problem? Just what you needed, right? I am trying to learn how to use cgi scripts. Here is my script: #!/www/rebol/rebol.exe --cgi --script rebol [] print {Content-Type: text/html^/^/} x: 5 * 8 print x print {Hi Everybody!} If I do this script from the rebol command line, it prints: Content-Type: text/html 40 Hi Everybody!
>>
So, I assume that the script is able to find the rebol interpreter. But if I load it into a browser it tries to download the file. Why doesn't it run the script? Louis

 [3/5] from: mwickes:verticalmicros at: 2-Jan-2002 8:35


If you are on a Unix/Linux server make sure to chmod +x <your script name here> This makes sure your script is sent as an executable by the web server... HTH! Mike At 03:50 AM 1/2/02, you wrote:

 [4/5] from: louisaturk:eudoramail at: 2-Jan-2002 12:57


Mike, Thanks. I am on a W2K server. Nevertheless, I realize that my script is not succeeding in calling the rebol interpreter as I thought. Louis At 08:35 AM 1/2/2002 -0500, you wrote:

 [5/5] from: louisaturk:eudoramail at: 3-Jan-2002 11:26


[Well, I hope this gets through. This is the second send. Several other posts also didn't get through, but I can't reconstruct them now.] Tim, Mike, Andrew, and Rich, Sorry about the email. My computer accesses the internet via [cox--work]. They have been having some real problems, and that has affected me. I have Eudora set to send plain text only, but it doesn't seem to be obeying me. Anyway, I took Tim's advice and reduced the test script to 4 lines. The main problem turned out to be that the people hosting our web site, Active-Host.Com, did not have the server set up properly for rebol. I sent them instructions from page 12-49 of the rebol/core users guide, and they had success in about 5 minutes. They really worked hard to help me on this. However, when I tested with IE 6.0 I experienced failure: instead of print hello, IE tries to download the file. With Oprah and Navigator, however, success. Active-Host tested IE 6.0 with success. So there must be something wrong with my copy of IE. Any ideas what? Another point, it seems that on my ISP's W2K server, the first line of the script has to be formatted as Andrew said (note the space and backslashes): #! c:\rebol\rebol -cs Many thanks to you guys for guiding me to success. Louis At 08:48 PM 1/2/2002 -0900, you wrote: * Dr. Louis A. Turk <[louisaturk--eudoramail--com]> [020102 17:44]:
> -- Unable to decode HTML file!! --
Hi Louis: I've been following your thread and responding as best I can.... However, the last posting as quoted above was not readable by my Mail Agent. Not sure why, but if you set your mime type to text, I know for sure that I can read it :>)