ID:               22947
 User updated by:  me at mattbeale dot plus dot com
 Reported By:      me at mattbeale dot plus dot com
-Status:           Bogus
+Status:           Open
 Bug Type:         Mail related
 Operating System: Windows 2000 SP3
 PHP Version:      4CVS-2003-03-28 (stable)
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2003-04-01 06:25:53] [EMAIL PROTECTED]

Not bug.


------------------------------------------------------------------------

[2003-04-01 06:25:39] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Set the relevant php.ini options correctly.



------------------------------------------------------------------------

[2003-03-28 21:41:10] me at mattbeale dot plus dot com

System Spec:
Pentium 2 350Mhz, 256MB RAM, Windows 2000 Professional SP3, Apache
1.3.27 Win32 PHP/4.3.2.2 RC (20030328 Win32 stable from snaps.php.net -
Build Date: Mar 28 2003 18:11:34) using Apache ISAPI module with GD2
support enabled in php.ini. 

The Problem:
The mail() function in PHP hangs when talking to my ISP mail server,
causing the Apache child process to hang indefinitely and ultimately
requiring it to be closed forcefully by stopping and restarting the
system service. There are never any errors reported by PHP, not even
those of the maximum execution timeout variety, so this would indicate
to me that something is very wrong somewhere. I can reproduce this 100%
and it happens regardless of how the mail function is written, even a
simple <?php mail('[EMAIL PROTECTED]', 'Hello', 'Hello There'); ?> will
cause it to hang.

To try and rectify this problem myself, I have formatted and reinstall
Windows 2000, completely uninstalled and reinstalled both Apache and
PHP several times, tried various recent versions of PHP and tried using
only a very basic httpd.conf/php.ini, with only required settings for
the SMTP support under Windows and it still does it. 

Using a packet-sniffer, I am able to monitor PHP as it is talking to my
ISP's mail server. Unless I'm reading things incorrectly, PHP never
gets past the initial HELO <machine name> command, even though my ISPs
mail server does respond with 250 OK, indicating that it was
successful. PHP blatantly ignores this and instead chooses to sit there
like a lemon, as if nothing ever happened.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22947&edit=1

Reply via email to