CGI engine on Darwin

Tim tim11 at bellatlantic.net
Sat Aug 31 23:32:01 CDT 2002


On 8/31/02 11:04 PM, "Sannyasin Sivakatirswami" <katir at hindu.org> wrote:

> 
> On Friday, August 30, 2002, at 08:45  PM,
> use-revolution-request at lists.runrev.com wrote:
> 
>> put URL "http://www.yahoo.com"
>> 
>> does not work. Can anyone running Rev as faceless CGI try this or
>> similar
>> commands? I can't get over this hump.
>> 
>> Thanks,
>> -- 
>> Tim\\
> 
> yes, i am using it on Darwin to develop CGI's and then when they are
> runnng fine, move them to my ISP's server... really speeds up dev time.
> 
> put URL "http://www.somesite.com"
> 
> Won't work the same as in Rev in faceless mode because  the library
> that processes the URL commands is not present. Assuming your goal is
> to have the CGI cause the browser to browser a specific web page that
> is not on your hard drive (which is what your example infers), you will
> have to issue an apache command
> 
> If your goal is to have the CGI "send"  a remote web page to your
> browser then try
> 
> put "Status: 301 Moved Permanently" & cr
> put "Location: "  & newURL & cr & cr\\
> 
> In the above scenariothe CGI is not actually processing any
> html/data/file  at all, but simply tells the browser to go fetch the
> URL that you are sending to it. then the browser does the rest...  The
> status line could be different... this is just an example from a CGI
> that process's 404's and sends a new URL to the browser. \
> 
> If you are trying to generate web pages to serve up, that's different.
> Then you would need to send a file from the hard drive to the browser
> with the proper headers:
> 
> put url "file:../forms-templates/redirect_404.html" into buffer ## or
> any html file
> put "Content-Type: text/html" & cr
> put "Content-Length:" && the length of buffer & cr & cr
> put buffer
> ==========
> 
> Hinduism Today
> 
> Sannyasin Sivakatirswami
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution

Thank you for this informative (hitherto unknown to me) bit of info. I like
your approach of developing locally and then uploading to a remote server.
My current problems are:

1. I've found out that my Web Hosting Provider uses Linux servers.
Accordingly I've downloaded the Linux Engine, untared/unzipped it and
uploaded it to the remote server. After changing the permissions, it still
does not work. My guess is because I did this on a Mac instead of a Unix
box, which I don't have. I suppose the same would apply to libUrl library
and any other rev stacks that I upload to the server.

2. My local server scenario works with the exception of

put URL "http://www.wahtever.com"

 even with the libURL stack in the CGI-Executables folder (permissions set,
start using ... etc., set). Your suggestions above are useful, but don't
address the specific advantages of the Put URL command (where you can pull
specific chunks of html data from other web pages and massage them into your
own cgi generated page, to cite just one example).

I suppose I'm excited as many people on this list must be because not
knowing Perl and just using Transcript language to create custom back end
solutions AND integrating that with databases is really something.
-- 
Tim




More information about the use-livecode mailing list