Re: Bug #15595 Updated: imap routines hang when "To" header is too large

From: Date: Wed, 20 Feb 2002 02:56:03 +0000
Subject: Re: Bug #15595 Updated: imap routines hang when "To" header is too large
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-80192@lists.php.net to get a copy of this message
On Tue, 19 Feb 2002, Markus Fischer wrote: > On Mon, Feb 18, 2002 at 11:09:34PM -0000, charlesb@ekit-inc.com wrote : > > ID: 15595 > > Updated by: charlesb@ekit-inc.com > > -Summary: imap routines hang when "To" header is too large > > Reported By: charlesb@ekit-inc.com > > -Status: Feedback > > +Status: Open > > Bug Type: IMAP related > > Operating System: Solaris-i86 > > PHP Version: 4.1.1 > > New Comment: > > > > An exact script is difficult. (I've spent a day or two trying to pin it > > down to a simple routine, not with any great success). > > > > However, it looks like > > > > $h = @imap_header($imp->stream, imap_msgno($imp->stream, $msgnum)); > > > > is hanging with a message that has to header of about 4K (again, this > > probably violates rfc822, but it shouldn't hang like it does). > > Can't you just dump the data unmodified in a file which > causes the crash and provide it as a url for download? OK, I've attached the imap file that causes php to hang. This is the php I used to get an unexplained termination: <?php error_reporting(15); $port = 143; $mailbox = 'INBOX'; $server = 'xxxxxxxx'; $user = 'xxxxxxxx'; $pass = 'xxxxx'; $connstr = '{' . $server. ':' . $port . '}' . $mailbox; print 'opening imap connection<br>'; $stream = @imap_open($connstr, $user, $pass); $h = @imap_header($stream, 1); print 'opened '.htmlspecialchars($h->toaddress)."<BR>"; ?> If you want to execute this via http, let me know - it'll take a bit of work to set this up privately on our external server, but I'm happy to do it. Note also I really appreciate you looking at this, but will be offline for the next 4 days in about 3 hours time, unavoidably. Thanks, Charles

« previous php.dev (#80192) next »