Re: Frontpage, CGI, perl and uploading

From: Ronx (ronx917_at_hotmail.com)
Date: 10/17/04


Date: Sun, 17 Oct 2004 06:56:29 +0100

This applies to Unix Servers:

On both the server and your local copy of the web convert the cgi folder to
subwebs. This allows the safe use of FTP. Never open the cgi folders in
FrontPage again.

Perl/cgi scripts should be uploaded with a third party FTP client, such as
cuteFTP, WSFTP etc. Set the client to treat the script files as ASCII text,
not as binaries. Note that FrontPage will always treat .cgi, .pl and .pm
files as binaries (FP2003 can be set to use ASCII on these extensions, but
it is a manual setting - Tools->Options->FTP tag and add the appropriate
extensions).

When the files are uploaded, use the CHMOD function in the FTP client to
check the attributes on each file are set to 755:
Owner Read Write Execute
Group Read Execute
Others Read Execute

Some servers do not need the CHMOD operation, but most do.

The major difference between Unix and Windows text files is the EOL
character -
Windows uses the combination CRLF, whereas UNIX uses the single character LF
(I think).
The extra CR in a Windows file "confuses" the Perl interpreter, and causes
errors.

-- 
Ron Symonds   (Microsoft MVP - FrontPage)
Reply only to group - emails will be deleted unread.
"Richard Bell" <rbell01824@earthlink.net> wrote in message 
news:8943n01uiroj5rsgmq8cnrmpl7t6rfitnc@4ax.com...
> I'm new to FrontPage and have encountered a rather strange problem I
> don't understand.  Here are the symptoms:
>
> I've created a simple page (has a form with a submit button whose
> action points to /cgi/test.cgi).
>
> /cgi/test.cgi is a perl script that simply writes a trivial web page (
> "hi dude").
>
> I publish the page and cgi
>
> When I click on the submit button I get a server 500 error
>
> Now here is where it gets strange ... if I open the published
> /cgi/test.cgi file on the server and then save it (no edits made) and
> try the submit button again all is well!
>
> I recall from some years back that there is a difference in Windows
> and Unix flavors about the last character in the file (a 0x00 if I
> recall). I'm just guessing that by opening and then closing the the
> /cgi/test.cgi file I'm 'Unixifing' the /cgi/test.cgi file so now
> things work. The question is what do I do on the FrontPage side to
> tell it that it's publishing to a Unix system so that it publishes
> Unix compatible files?
>
> Thanks.