PDA

View Full Version : cgi script trouble


Hypo
07-27-2001, 03:11 PM
I have some cgi scripts which are giving me an internal server error. Somehow the characters ^Ms are appearing on the end of each line in the script which seems to be th cause of the problem. The chmoding is alright, and the scripts work in telnet when i use the perl command. I had downloaded the working cgi scripts from the server, then reuploaded them to another directory, when they stop working. Any idea what's happenin and how to solve this?

Rich
07-27-2001, 03:15 PM
usually happens when they uploaded in binary mode or you've edited them in software that adds control codes.

Ludedude
07-27-2001, 04:43 PM
Yep, you have to upload all CGI related stuff in "ascii" or text mode, not binary.

^M is the code for a carriage return/line feed so it's probably at the end of nearly every line.

You might try downloading the borked file in ascii again to see if it fixes it....it might...then again, you might be hosed.

Hypo
07-28-2001, 01:04 AM
Ok its working now. I think the problem was I zipped and uploaded and unzipped. Somehow that caused all those insertions.