Link to home
Start Free TrialLog in
Avatar of sayhi
sayhi

asked on

Form mail probs

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.
Avatar of ichen
ichen

are you sure that you have the mailweb.pl in your cgi-bin?
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...
Avatar of sayhi

ASKER

@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
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.
Avatar of sayhi

ASKER

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
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.
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sayhi

ASKER

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!