PDA

View Full Version : Premature End of Script Headers


casep
01-20-2003, 02:25 PM
I'm a newbie just testing some basic I/O on my web server.

#!/usr/bin/perl

open(SU, ">survey.txt") || die "Cannot open survey.txt $!"; print SU "This is working now.";
close (SU);

I keep getting the 500 Internal Server Error and my error log says:
[Mon Jan 20 09:08:40 2003] [error] [client 66.80.146.67] Premature end of script headers: /home/enki/public_html/cgi-bin/process.pl

The research I've done seems to point to a permissions problem - that I should change the CHMOD settings. No matter what settings I use, I keep getting the same error. Any help is much appreciated!!

Calilo
01-21-2003, 01:48 AM
Are you uploading your file in acsii mode, that is the most common mistake, just remember cgi scripts must be uploaded in ascii mode and chmoded 755,

that should make the trick,
your ftp prog must have ascii mode somewhere

Calilo

casep
01-21-2003, 01:45 PM
Yes, I was uploading in ASCII mode and I did set permissions to 755. However, my FTP software is kind of strange. It seems that whenever I change the permissions, the settings don't stick. After I change them and then view the permissions, they are never the same as what I had just set. Ever had this problem? I'm using WS_FTP95 (yes, it's old, but has never given me any problems)

Calilo
01-22-2003, 12:51 AM
this is the first time i hear of that, i have a similar problem, but when i change the permissions the fts app, just does nothing, so to solve this i have to go to the preferences panel, and there change the file permissions for every uploaded file, try doing this, or else maybe reinstalling your ftp app.

Calilo