|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-10-26 21:08 UTC] mike at mikekrejci dot com
Description:
------------
If you make an error in your $body array for the imap_mail_compose rather then giving an error it creates a segmentation fault. The error in the code I have sent is that I have nested MULTIPARTs without the corresponding sections.
Reproduce code:
---------------
<?php
$envelope["to"] = "tirk@tirkzilla.com";
$envelope["from"]="mike@mikekrejci.com";
$envelope["reply_to"] = "mike@mikekrejci.com";
$envelope["subject"] = "Reproducible error";
$envelope["date"]= date('r');
$part["type"] = TYPEMULTIPART;
$part["subtype"] = "mixed";
$body[1] = $part;
$part["type"] = TYPEMULTIPART;
$part["subtype"] = "mixed";
$body[2] = $part;
$part["type"] = TYPETEXT;
$part["subtype"] = "plain";
$part["contents.data"] = "Message Text.\n";
$body[3] = $part;
$MIME = imap_mail_compose ($envelope, $body);
?>
Expected result:
----------------
the following will be entered in your log file:
[Tue Oct 26 12:01:38 2004] [notice] child pid 3282 exit signal Segmentation fault (11)
Actual result:
--------------
I do not have a backtrace available.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 04:00:01 2025 UTC |
backtrace: #0 0x082c6f9c in rfc822_encode_body_7bit (env=0x84ec8a0, body=0x84ec940) at rfc822.c:1572 #1 0x082c6f9c in rfc822_encode_body_7bit (env=0x84ec8a0, body=0x84ec8e8) at rfc822.c:1572 #2 0x08149622 in zif_imap_mail_compose (ht=2, return_value=0x84ec884, this_ptr=0x0, return_value_used=1) at /home/tirk/Desktop/php-5.0.2/ext/imap/php_imap.c:3102 #3 0x080ec0de in zend_do_fcall_common_helper (execute_data=0xbfffce30, opline=0x84ebaa0, op_array=0x84e64f4) at /home/tirk/Desktop/php-5.0.2/Zend/zend_execute.c:2711 #4 0x080ec734 in zend_do_fcall_handler (execute_data=0xbfffce30, opline=0x84ebaa0, op_array=0x84e64f4) at /home/tirk/Desktop/php-5.0.2/Zend/zend_execute.c:2843 #5 0x080e902c in execute (op_array=0x84e64f4) at /home/tirk/Desktop/php-5.0.2/Zend/zend_execute.c:1400 #6 0x080cb2f5 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/tirk/Desktop/php-5.0.2/Zend/zend.c:1060 #7 0x0809655b in php_execute_script (primary_file=0xbffff1a0) at /home/tirk/Desktop/php-5.0.2/main/main.c:1629 #8 0x080f35d1 in apache_php_module_main (r=0x84d2e44, display_source_mode=0) at /home/tirk/Desktop/php-5.0.2/sapi/apache/sapi_apache.c:54 #9 0x0808cf85 in send_php () #10 0x0808cfef in send_parsed_php () #11 0x0827e0dd in ap_invoke_handler () #12 0x08292daf in process_request_internal () #13 0x08292e0e in ap_process_request () #14 0x08289e7f in child_main () #15 0x0828a027 in make_child () #16 0x0828a18d in startup_children () #17 0x0828a833 in standalone_main () #18 0x0828b051 in main ()