Link to home
Start Free TrialLog in
Avatar of aaronjcg
aaronjcg

asked on

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.
Avatar of shivers
shivers

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?
ASKER CERTIFIED SOLUTION
Avatar of elpmet
elpmet

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of aaronjcg

ASKER

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!