• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Problem with Perl emailer

Jenova314

Senior member
I'd been editting our emailer script to accommodate some of our new products. After uploading the new cgi file, I received an "internal server error" message. I've checked that the file had been uploaded to the proper location ("/cgi-bin/config.cgi"), and the permissions properly set (775). The CGI file had been saved in an UNIX format, with ASCII encoding.

Anybody familiar enough with the matter to help me out? I may very well have fat-fingered the CGI file, and caused these errors.

Here are the relevant files:

config.cgi in txt format
linking webpage in text
 
Look at the webserver logs, at least with Apache they're pretty good about pointing out where the problem is.
 
I'd love to poke around at the logs, but our company doesn't even know where the servers are. that would've been the first thing i'd try. we don't run our own servers, so i only have ftp access.
 
The hosting company doesn't give you access to the logs?

Oh and in unix there's no distinction between binary and ascii files, that's a Windows thing, so try uploading it in binary.
 
If you created the file on a Windows machine (in Notepad or something), it might have an extra CR character at the end-of-line (Link). If you have access to the Unix console, try to open the file in vi and see if there ^M characters there.

If possible, try to run the Perl script from a command prompt. It might show you where the problem is. I hope it is possible because it might be expecting input from a webpage to run at all. Try perl -c at least (Link)
 
If possible, try to run the Perl script from a command prompt. It might show you where the problem is. I hope it is possible because it might be expecting input from a webpage to run at all. Try perl -c at least

Seem to run here on the CLI after I change it from DOS->unix format, but without the webpage with the form the email just gets sent with all empty values.
 
yeah, most likely crappy windows editors. Get vi for windows, or vim for windows and redo the file edits/check for hokey returns.
 
Originally posted by: Jenova314
thanks guys. i checked the logfiles, and just as i suspected, the relevant entry is showing:

Premature end of script headers: config.cgi, referer: http://hdlfocus.com/hpc/products/c_amd_1x.html

i'm using textpad in windows, and saving in ansi/unix format. not sure what else i could've done wrong... it's still not acting nice with me.

Doesn't sound like you read my or nweaver's posts above.
 
Back
Top