Click to See Complete Forum and Search --> : Form failing regardless of code


Simpy
01-31-2003, 06:32 PM
Hi all,

I've been on the forums trying to get advice for a problem with a form I created. When a user clicks the "Submit" button on the form an e-mail with their information is sent to me and and they are redirected to a "thank you" page. The problem is that I am receiving the e-mail but the user is not being redirected to the "thank you" page. Instead the form just loops forever (not sure if that's the right terminology so I'll put it this way: the globe in IE just goes around endlessly) and eventually the user gets a "connection timed out" error.

I got several suggestions on how to solve this and all of them involved changing the code in various ways. So I re-wrote the code using different methods. I did it with multiple HTML/PHP pages, editing my existing code, using just one PHP page for the whole process, HTML with Java, etc. But I kept getting the exact same "timing out" error. I even copied the source code of 2 forms (that I know work correctly) from a tutorial and tried them both on my server and I got the same error. So I know the code is not the problem so that tells me something is wrong on the server itself, right? (It's a Windows 2000 Server.)

I did re-install the Windows 2000 Server operating system in December and that is right around when this problem began but I'm not sure the 2 are related or not. I'm obviously not an expert with these things.

If anyone has any ideas I'd love to hear them. Thanks!

swon
01-31-2003, 06:44 PM
if you use php, try this one, if you haven't until yet, if it works fine, something with the script isn't ok:


<?
$yourMail = "yours@yourdomain.com";
mail($yourMail,"test","testing","From:$yourMail");
?>

Simpy
01-31-2003, 07:01 PM
Thanks swon.

I tried the script you sent but I got the same result. I received the e-mail properly but I got the "connection timed out" error. (And yes, I'm using PHP.)

swon
01-31-2003, 07:07 PM
did you make settings, sendmail etc. in the php.ini on the server?

Simpy
02-03-2003, 12:31 PM
Yes, the php.ini file should be set-up correctly. The mail settings are pasted below. Is there a specific setting(s) on the .ini file you think I should check more closely?

[mail function]
; For Win32 only.
SMTP = "209.79.42.3"

; For Win32 only.
sendmail_from = www@zlott.com

swon
02-03-2003, 12:42 PM
Try to set in your mail.something.com or smtp.something.com
not an IP, something like this one (mine):

[mail function]
; For Win32 only.
SMTP = mail.2wire.ch

; For Win32 only.
sendmail_from = mr.swon@localhost.ch

Simpy
02-03-2003, 01:28 PM
Tried your suggestion, but still got the same result. The e-mail was sent, but I still got the "timed out" errror. (And I confirmed that I entered the correct name for the mail server in the SMTP= field (just in case).)

[mail function]
; For Win32 only.
SMTP = "keeper.zlott.com"

; For Win32 only.
sendmail_from = www@zlott.com

Simpy
02-03-2003, 03:21 PM
Well I finally got this problem solved. Turns out there's a "delay" setting that you can turn on or off on the mail server. I guess it's designed to prevent spam as the server "analyzes" the e-mail to make sure it's okay to let pass through. (At least that's what I think it's supposed to do?) Since this delay was turned on, this analyzing process was taking too long. Apparently Microsoft has a limit for how long this analyzing process can take and if it exceeds that limit you get the "timed out" error. I turned the delay setting to off and everything's working again.