CGI Fiction Search Example

Frank D. Engel, Jr. fde101 at fjrhome.net
Fri Sep 3 10:57:44 EDT 2004


Interesting... If I use TextEdit to create a plain-text file and save 
it with default settings (except to make it plain text), it uses UNIX 
line endings already.

Xcode (Apple's development IDE for X.3) lets you change the line ending 
type using a submenu of the "Format" menu; it also defaults to UNIX 
line endings, or you can choose Mac or Windows line endings.

Another possibility (I just found this on a web site; I have not tested 
it myself yet) is to use this from the command line to convert Mac to 
UNIX line endings:

tr \\r \\n < /path/to/script > /path/to/new_script

Which seems correct from the man page anyway.

The finder will let you change file permissions, but you cannot choose 
"Execute" rights using the finder; that must be done using the 
Terminal. A shortcut to entering pathnames to files if you don't want 
to do all of the typing is to start typing the command, and when you 
would otherwise type in the pathname, drag the file's icon from the 
finder onto the terminal window.  That will fill in the pathname for 
you.  Also, I don't think I would assign write permissions to the 
scripts, just read and execute.  Besides the numbers, you can do things 
like this too:

chmod ugo+rx <filename>

Will add "read" (r) and "execute" (x) rights for the "user/owner" (u), 
"group" (g) and "others" (o) for file <filename> (assuming they do not 
have them already), without changing any existing write permissions

chmod o-w <filename>

Will take away the "write" (w) permissions of "others" (o) without 
changing any existing read or execute permissions or the permissions of 
the user/owner or the group associated with the file.

etc.

On Sep 2, 2004, at 11:19 PM, J. Landman Gay wrote:

> On 9/2/04 11:12 AM, Gregory Lypny wrote:
>
>> Hello Jacqueline,
>> I found the error log.  Here are the last errors for Fiction Search 
>> and World.
>>     Gregory
>> [Thu Sep  2 10:20:31 2004] [error] [client 127.0.0.1] Premature end 
>> of script headers: 
>> /Library/WebServer/CGI-Executables/fictionsearch.mt
>> [Thu Sep  2 10:25:18 2004] [error] [client 127.0.0.1] Premature end 
>> of script headers: /Library/WebServer/CGI-Executables/world.mt
>
> Dave made some good suggestions; wrong permissions and bad line 
> endings are the two things that I always forget too. Both will cause 
> this error.
>
> What OS are you testing on? OS X? If so, you really do have to use 
> Terminal to set permissions -- the Get Info box in the Finder won't do 
> it. Also, even though it is OS X Macintosh, you still need to use 
> Unix-style line endings. If you don't want to do that using Dave's 
> suggestion via Revolution, you can also set those using BBEdit.
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-----------------------------------------------------------
Frank D. Engel, Jr.  <fde101 at fjrhome.net>



More information about the use-livecode mailing list