#22947 [Opn]: mail function hang-up

From: Date: Fri, 25 Apr 2003 19:09:58 +0000
Subject: #22947 [Opn]: mail function hang-up
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38409@lists.php.net to get a copy of this message
ID: 22947 User updated by: me at mattbeale dot plus dot com Reported By: me at mattbeale dot plus dot com Status: Open Bug Type: Mail related Operating System: Windows 2000 SP3 PHP Version: 4CVS-2003-04-23 (stable) New Comment: Just got a reply from my ISP. The mail software they use is Qmail. Hope that helps to resolve whatever the problem might be. Previous Comments: ------------------------------------------------------------------------ [2003-04-24 17:26:07] me at mattbeale dot plus dot com I'm uncertain as to which SMTP server it is as there is no specific identification, but I have emailed someone I know who works for them to see if he can find out for me. If not, then I wouldn’t know, sorry. ------------------------------------------------------------------------ [2003-04-23 04:29:34] sniper@php.net Which SMTP server is it? Seems like it's a problem with it if it hangs.. ------------------------------------------------------------------------ [2003-04-21 22:00:48] andrew at pirionsystems dot com dot au Our SMTP server is localised to the same LAN, however we experience the same issue. Examining the output of netstat reveals that an open SMTP connection is left lingering, however this session is completely dead, and any clients that hit a page attempting to session_start with the same session ID result in a hung page. The mail is never sent. Any subsequent attempts to use the web server's PHP functionality continues with poor reliability, and external commands are never executed. (Processes spawned, and left hung) This has been tested in Netscape 4.61, Internet Explorer 6.0.2800.1106, and Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 The server is a Pentium 3 550, 192MB RAM, Windows 2000 Server SP3, Apache 1.3.27/Win32, PHP 4.3.2RC1. ------------------------------------------------------------------------ [2003-04-01 08:29:19] me at mattbeale dot plus dot com You'll have to trust me when I say I _have_ set the appropriate commands in php.ini and checked them and double checked them again (paranoid moi?) and I can confirm that both the SMTP and sendmail_from settings are the same as used in my mail client and that has no problems sending mail whatsoever. If I put an invalid server address, one that doesn't exist, then PHP does correctly fail to connect and returns false. I don't know if it will make a difference at all, but to make sure my ISPs mail server is working OK I ran a few tests by using telnet to connect to it and sent it the same commands that PHP sends it. This always works fine and the server always replies with 250 success. Using telnet I can even go as far as to issue the relevant MAIL FROM, RCPT TO and DATA commands and successfully send myself or anyone else an e-mail. I don't know why or how but PHP is most definitely not acting on the reply it gets from the initial HELO <machinename> command it sends, even though it is seemingly receiving it just fine. If you're at all interested, this is what the communication between PHP and my ISPs mail server looks like: SMTP: 220 warrior.services.quay.plus.net - Plus.Net, The smarter way to Internet - ESTP PHP : HELO server SMTP: 250 warrior.services.quay.plus.net - Plus.Net, The smarter way to Internet - And that's it. Nothing more happens and PHP sits there in a loop, doing nothing until I forcefully stop and restart the Apache process. Just a suggestion, feel free to ignore it and smite me if you will, but if this isn't a specific bug with PHP, might it be wise to employ a timeout on the SMTP functions so that if this does happen for whatever reason then the connection is terminated after say 30 seconds and the mail() function then returns false. ------------------------------------------------------------------------ [2003-04-01 06:25:53] sniper@php.net Not bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22947 -- Edit this bug report at http://bugs.php.net/?id=22947&edit=1

« previous php.bugs (#38409) next »