Forum Moderators: coopster & phranque

Message Too Old, No Replies

Content length error in formmail

         

jongog

4:57 pm on Oct 10, 2003 (gmt 0)

10+ Year Member



i have just tried for the first time to use a cgi script in a website and I got this error:Can't locate object method "ENV" via package "CONTENT_LENGTH" (perhaps you forgot to load "CONTENT_LENGTH"?) at d:\websites\thoma2\www\cgi-bin\FormMail.cgi line 171.

I have no idea what it means despite reading the documentation. the version of formmail I am using is 1.92

also I am not sure what I am supposed to put in the @referers line. is it my website name www.something.com or just soemthing.com and do I follow it up with a comma then the IP address?

I would be grateful for and help as I am getting desperate

John

claus

6:27 pm on Oct 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld jongog :)

This sounds like a script error in your formmail script. Look for a line that does not look exactly like this one and make it look exactly like it:

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

Anyway, you should not use formmail at all.

There are so many security issues with formmail that it's better to use another script. This one is far better - it does the same as formmail and can even replace it, but security is improved. It's now in version 3.09c1 and can be found here:

[nms-cgi.sourceforge.net...] (even recommended by the writer of formmail)

Here's the Readme file [nms-cgi.sourceforge.net] - you'll notice that it can also do a lot more than the formmail script you're using.

>> @referers

This link is the exact section of the readme file for the script that you are using that explains this:
[scriptarchive.com...]

/claus

jongog

5:43 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



Thanks very much. I will try to fix formmail at the moment as it is an active website, then I will switch once I undertand the new script

John

jongog

5:46 pm on Oct 11, 2003 (gmt 0)

10+ Year Member



I should have also said that it is running on windows not linux. The webhosts though said that the script would work