Bug #8734 Updated: Unable to send large emails, causes a GPF - small email work fine.

From: Date: Fri, 22 Jun 2001 22:33:07 +0000
Subject: Bug #8734 Updated: Unable to send large emails, causes a GPF - small email work fine.
Groups: php.dev 
Request: Send a blank email to php-dev+get-57714@lists.php.net to get a copy of this message
ID: 8734 Updated by: hholzgra Reported By: wayne.cope@sitel.co.uk Old-Status: Open Status: Duplicate Bug Type: Mail related Operating system: PHP Version: 4.0.4pl1 Assigned To: hholzgra Comments: see #11165 Previous Comments: --------------------------------------------------------------------------- [2001-01-30 05:03:00] sniper@php.net reclassify --------------------------------------------------------------------------- [2001-01-16 11:47:11] wayne.cope@sitel.co.uk I have been able to make the change and recompile the code to use a 1Mb buffer, instead of a 4K buffer and the mail() function works fine now. You need to change the line #define MAIL_BUFFER_SIZE (1024*4) /* 4k buffer */ to #define MAIL_BUFFER_SIZE (1024*1024) /* 1Mb buffer */ in file "sendmail.h" to make this function work. Ideally, the buffer size should be calculated dynamically, but that'll take a bit longer of course ! Can someone try and pop this change into the next release please. TTFN ! Wayne Cope --------------------------------------------------------------------------- [2001-01-16 08:25:58] wayne.cope@sitel.co.uk I have checked the source code for the Windows version of the mail() function and have determined that there is a 4K limit to the mail buffer - which is nowhere near enough. The line is: #define MAIL_BUFFER_SIZE (1024*4) /* 4k buffer */ Which can be found in "sendmail.h" under the Win32 compilation. I can't compile the code to check for sure, but it does look like this is the problem. C'ya ! Wayne Cope --------------------------------------------------------------------------- [2001-01-16 07:40:01] wayne.cope@sitel.co.uk When sending attached files (test file is only 14K), a GPF is caused by the mail() function. When the file is small (e.g. 1K) the function works fine. I have checked the ini file settings and all seems fine, and have run the same code on version 4.0.4 and it also crashes then too. I am unable to check on any other versions. I would guess it's a similar problem to the other "malloc problem" in this section (bug report: 8360) as it would appear to be a memory issue. Let me know if you need any more info... Wayne Cope. --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=8734&edit=2

« previous php.dev (#57714) next »