?
Solved

Form mail probs

Posted on 1999-12-25
8
Medium Priority
?
165 Views
Last Modified: 2013-12-25
hi guys,
maybe you can help, since virtualave.net support hasn't helped much. the script that i'm having trouble with can be found at

http://uffstay.virtualave.net/scripthelp.txt


the page where the form is at http://uffstay.virtualave.net/sendus.html

i checked all my paths, permissions and everything, and still when i submit the form, i always get the '500 internal server error'. i'm new to cgi, so i thought maybe it was something with script, so i tried changing the form action to GET and the part where is says
read(STDIN, $input, $ENV{'CONTENT_LENGTH'}); to

read(STDIN, $input, $ENV{'QUERY_STRING'});

still didn't work. i don't know what else to do or what could be wrong. thanks for any help.
0
Comment
Question by:sayhi
8 Comments
 
LVL 1

Expert Comment

by:ichen
ID: 2306481
are you sure that you have the mailweb.pl in your cgi-bin?
0
 
LVL 1

Expert Comment

by:sdjjm
ID: 2306739
When you say you checked your paths, did you also make sure you have the same directories on your server the script assumes?  I see the following in the variable list:

$logfile = "/home/uff/public_html/mailweb/logfile.txt";
$data = "/home/uff/public_html/mailweb/data.txt";
$date = '/bin/date';

Just thought I'd point that out incase you didn't see it...
0
 
LVL 1

Author Comment

by:sayhi
ID: 2306873
@ichen mailweb.pl is in cgi-bin
@sdjjm not sure what u mean by "same directories on your server the script assumes" i'm going by virtualave's FAQ
http://www.virtualave.net/faqcgi.html

hope that helps any
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:sdjjm
ID: 2306931
OK, see the 3 examples I posted above?  Those are variables that are being assigned to directories that you better have in your web page area or the script is not going to run.  If for example, I took the same script and placed it in my cgi-bin directory, it wouldn't run because I don't have a "/mailweb/" or a "/bin/" directory in my server area...
This looks like some type of script that was automatically generated and installed in your web page area by the space provider.  If so, you should contact them and see if they can help you with it.
0
 
LVL 1

Author Comment

by:sayhi
ID: 2306955
adjusted points to 252

ok, well i'll tinker with this script a little more (i have no experience in CGI scripting, but i've successfully installed a few :)and send another email to support
thanks for all comments
0
 
LVL 1

Expert Comment

by:maabu
ID: 2307444
Changing the stdin read to QUERY_STRING will not work, as with GET-type input, the data is not passed via stdin.  I would not change the script from its original state - it seems to be ok, but obviously some error is being generated (hence the 500 server error which is usually "malformed header from script" so the system kicked out something other than was expected.

If you have telnet access, try to run the script locally just to see if there is an obvious syntax error.  I do agree that it looks like a possible file permissions problem.
0
 
LVL 85

Accepted Solution

by:
ozo earned 1000 total points
ID: 2307490
perl -Mdiagnostics -wc scripthelp.txt
In string, @mail now must be written as \@mail at scripthelp.txt line 30, near "moremails@mail"
Unquoted string "message" may clash with future reserved word at scripthelp.txt
        line 62 (#1)
   
    (W) You used a bareword that might someday be claimed as a reserved word.
    It's best to put such a word in quotes, or capitalize it somehow, or insert
    an underbar into it.  You might also declare it as a subroutine.
   
Unquoted string "subject" may clash with future reserved word at scripthelp.txt
        line 64 (#1)

scripthelp.txt had compilation errors (#2)
   
    (F) The final summary message when a perl -c fails.
   
Uncaught exception from user code:
        scripthelp.txt had compilation errors.
Exit 2
0
 
LVL 1

Author Comment

by:sayhi
ID: 2308580
Hey, WOW! it finally works! thanks ozo!
btw, what program did u use? (maybe i can check other scripts i have trouble with)
one minor thing though (but it doesn't really matter to me), is that after submitting, it takes a little while for it to process and tell u that an email was sent... maybe connection...server...or script?
anyway, THANKS everyone for helping me out!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question