Forum Moderators: phranque

Message Too Old, No Replies

error 500 when cgi file not in UNIX format

         

ozzganator

1:17 pm on May 29, 2004 (gmt 0)



Hey all,

I am running apache 2.0.48 on SuSE Linux 8.2, no GUI (stand alone server). So I upload, modify and delete apache file through Samba 2.2.7 from winXP. The weird thing is that if create a .pl file with windows notepad I get error 500s. The test files bundled with apache worked no problem.
After much experimenting I used notetab light and set the file saving mode to UNIX. Open up THE SAME FILE, save it, and voila! no problem, the script is executed.

This isn't really a problem per se as notetab is much superior to notepad and I enjoy using it more anyway, but this has got me really confused. Can anyone shed some light as to why this is going on, and maybe a possible fix for it - the reason being that if i'm on a computer without notetab i would still like to be able to connect to my server from a windows environment and edit my cgi scripts.

TIA!

victor

1:27 pm on May 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Windows, MAC OS and UNIX all use different variations of CR and LF (carriage return and line feed) characters to mark the end of a line in a text file.

(I forget which uses which).

If you upload a PC or MAC text file to a UNIX server you must click whatever option gets the new line characters converted en route.

Otherwise it all looks like one line to Apache.