on-rev.com Perl recipe

Alex Tweedly alex at tweedly.net
Sun Nov 1 18:17:19 EST 2009




Yes, after a few tries ....

The script was simple :
> #!/usr/bin/perl
>
> print "Content-type: text/html\n\n";
> print <<HTML;
> <html>
> <head>
> <title>A Simple Perl CGI</title>
> </head>
> <body>
> <h1>A Simple Perl CGI</h1>
> <p>Hello World</p>
> </body>
> HTML
> exit;
It's in http://www.alextweedly.on-rev.com/cgi-bin/hw.pl

It's actually in <my home folder>/public_html/cgi-bin/hw.pl
permissions is 755

The thing that took me a few tries was line endings - I initially 
transferred it with the on-rev client (from Windows), and that failed to 
convert the line endings (file was 210 bytes locally and on the server).

I switched to transferring it with FileZille (setting the transfer type 
to ASCII, not leaaving it as auto - just to be safe). Now the file is 
210 bytes on my laptop, but 196 on the server - and now it works.  I had 
a similar problem (only took hours to solve it) when I tried using Python.

So - any time I have a problem on on-rev, first thing I do is look at 
the line endings ...

Good luck
-- Alex.


Michael Kann wrote:
> I'm happy with how easy it is to get started with the on-rev website. I'm stuck, though, with trying to get a Perl script to work. Can anyone post a working setup recipe? I only need a feeble "hello" to get going. 
>
> I guess I'll need:
>
> name of file
> text of file
> placement of file on server
> extension on file
> permissions on files and folders
>
> I've tried every permutation of the above and nothing has worked. 
>
> Thanks in advance.
>
> Michael Kann
>
>
>
>
>
>
>
>
>       
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>   




More information about the use-livecode mailing list