CGI from MAC to UNIX

I am having problems posting my CGI to my UNIX server from my MAC. I know enough about Perl to know that my scripts are fine. I know all the CGI basics of setting permissions, checking paths, uploading in ASCII mode and that sort of thing. I am pretty sure that my problem lies in the old carriage returns. I frequently get the 500 INTERNAL SERVER ERROR. I have tried saving in UNIX mode from BBEDIT, I have tried using NETSTRIPPER to strip carriage returns. Nothing seems to be working. I am also using FETCH and TRANSMIT for FTP. If anybody has any insight it would be greatly appreciated.
aaronjcgAsked:
Who is Participating?
 
elpmetConnect With a Mentor Commented:
aaronjcq,

At your unix prompt, type

   strings your_mac_file > new_file

where "your_mac_file" is what you transfered from Mac, and "new_file" is the filename you want to name to use on Unix.

See if it works for you.

Elpmet.
0
 
shiversCommented:
if you have a telnet account with your ISP you could try running your script from the command line, but thats unlikely so...

....AFAIK, there are three ways to store text file as far as CR and LF chars go - one for DOS, one for UNIX and one for the Mac.  I think your problem lies there...   ...try using a hex editor on your script after you've stripped the carridge returns to see if there are any line breaks present.  Uploading in ASCII mode should have sorted it out... ...but you never know...

also, if your script is written in Perl - have you made sure that the path to the Perl interpreter is correct?
0
 
elpmetCommented:
Just occurred to me that you may not have telnet client software on your mac.

If so, you can download NCSA Telnet from http://www.ncsa.uiuc.edu/SDG/Software/MacTelnet/HowToGetIt.html

Its readme file is also there.

You should contact your isp if you don't have password for telnet access.
I'm sure you do.

Elpmet.
0
 
aaronjcgAuthor Commented:
That was a useful tip. But useful in the way that it revealed another problem with the script I'm using. But that's certainly not your fault. Thanks!
0
All Courses

From novice to tech pro — start learning today.