ID: 20056 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Mail related Operating System: Windows XP Pro PHP Version: 4.2.3 New Comment:
I have also experienced this bug using 4.2.3 on Windows XP Pro SP1 IIS. I use the same method to construct and send a mail: $success = mail($to, $subject, null, $headers); I have done many tests to ensure that my headers are correctly formed, and I did not experience this problem on an OpenBSD 3.1 box running PHP 4.2.3 and Apache. The occurs seemingly based purely on total size of headers, as I can send any combination of message and/or attachment(s), as long as it's not more than a few kb. Both web servers share the same mail server which is QMail 1.0.3 running on OpenBSD 3.1, which correctly sends mail of any size from OpenBSD/Apache, but will only send small mail from Windows XP/IIS. I have even tried the QMail server that my ISP provides with the same results. The error appears to be related to msvcrt.dll which I believe has been changed with Windows XP SP1. Is this DLL used to "speak" to the mail server? I find that an older version is also distributed with SecureCRT (but is not stored anywhere in the system PATH). The Application error that shows up in my event log follows: Faulting application php.exe, version 0.0.0.0, faulting module msvcrt.dll, version 7.0.2600.1106, fault address 0x0002f078. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. 0000: 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 70 68 70 ure php 0018: 2e 65 78 65 20 30 2e 30 .exe 0.0 0020: 2e 30 2e 30 20 69 6e 20 .0.0 in 0028: 6d 73 76 63 72 74 2e 64 msvcrt.d 0030: 6c 6c 20 37 2e 30 2e 32 ll 7.0.2 0038: 36 30 30 2e 31 31 30 36 600.1106 0040: 20 61 74 20 6f 66 66 73 at offs 0048: 65 74 20 30 30 30 32 66 et 0002f 0050: 30 37 38 078 I will try the latest snapshot now also, but believe stripping \r\n\r\n may cause me headache's too. Perhaps it should only strip replace \r\n\r\n(\r\n)+ with \r\n\r\n to eliminate additional unecessary returns. Previous Comments: ------------------------------------------------------------------------ [2002-10-28 10:48:16] [EMAIL PROTECTED] Ok, i'm not mad, i found in sendmail.c in php-4.3.0pre2\win32 /* This pattern removes \r\n from the start of the string, * \r\n from the end of the string and also makes sure every line * is only wrapped with a single \r\n (thus reduces multiple * occurences of \r\n between lines to a single \r\n) */ #define PHP_WIN32_MAIL_RMVDBL_PATTERN "/^\r\n|(\r\n)+$/m" #define PHP_WIN32_MAIL_RMVDBL_REPLACE "" This causes my pb (with 4.3), as mime client i've tested use multiple \r\n to separate fields ( a least outlok express uses and needs that ). ------------------------------------------------------------------------ [2002-10-28 08:35:20] [EMAIL PROTECTED] Sory, I dont't think it's a SMTP configuration error as everthing was ok with the SMTP server before the update to PHP 4.3. With 4.2.3, big strings in the "additional_headers" parameter where causing PHP HANG (and not SMTP server). Smaller strings where ok and unmodified. With 4.3, PHP no more hangs, BUT The strings in "additional_headers" are modified (no double CR/LF allowed). The SMTP Server is listening to usual port, and sends e-mails correctly without touching any part of the mail when comming from ather apps than PHP. ------------------------------------------------------------------------ [2002-10-28 07:57:54] [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. Sounds like a configuration issue with your Windows' SMTP server. ------------------------------------------------------------------------ [2002-10-25 05:59:12] [EMAIL PROTECTED] The scripts no more hangs the machine, but ... does'nt work any more. Outlook express cant't recognise the mime format. The difference between the results of the same script on Linux/4.2.3 and XP/4.3 seem to be "\r\n\r\n" are changed to "\r\n". I'm not sure, but i think the double /r/n/r/n was compulsory in some cases to separate mime blocks Tried "\r\n \r\n" instead, witch is not changed but it does not work. Everything else "\r\n\r\n\n\r" ... is each time changed to "\r\n". ------------------------------------------------------------------------ [2002-10-24 08:23:05] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ 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/20056 -- Edit this bug report at http://bugs.php.net/?id=20056&edit=1