|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-11 03:44 UTC] dynein at fasterweb dot net
$mbox = imap_open("{my.imap.host:imap_port}","username","password")
or die("can't connect: ".imap_last_error());
$status = imap_status($mbox,"INBOX",SA_ALL);
This operation has made apache Segmentation fault.
"child pid xxxx exit signal Segmentation fault (11)" will appear in the apache log file.
but below works well:
$status = imap_status($mbox,"{my.imap.host:imap.port}INBOX",SA_ALL);
related software:imap-devel-2001a,php4.1.2,php4.2.1,apache 1.3.23,redhat 7.1
my configure line:
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-sigchild --with-imap --with-gettext --with-mysql=/usr --with-mm=/usr --enable-trans-sid --enable-inline-optimization --enable-versioning --with-zlib --with-mhash=/usr --with-mcrypt --with-iconv --enable-shmop
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
the test script: <?php $mbox=imap_open("{127.0.0.1:143}INBOX", $username, $password) or die("Can't connect"); $mbox_status = imap_status($mbox,"INBOX",SA_ALL); print $mbox_status->messages; ?> the backtrace: #0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at imap4r1.c:496 496 if (LEVELSTATUS (stream)) { /* have STATUS command? */ (gdb) bt #0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at imap4r1.c:496 #1 0x0817ace3 in imap_status (stream=0x826ff30, mbx=0x82709b4 "INBOX", flags=31) at imap4r1.c:490 #2 0x08156102 in mail_status (stream=0x826ff30, mbx=0x82709b4 "INBOX", flags=31) at mail.c:936 #3 0x080f35ab in zif_imap_status (ht=3, return_value=0x826b61c, this_ptr=0x0, return_value_used=1) at php_imap.c:2654 #4 0x0814438b in execute (op_array=0x826b75c) at ./zend_execute.c:1598 #5 0x080d01e2 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810 #6 0x0806da9a in php_execute_script (primary_file=0xbffff9d0) at main.c:1381 #7 0x08067f58 in main (argc=2, argv=0xbffffa84) at cgi_main.c:778 #8 0x40158647 in __libc_start_main (main=0x80674b0 <main>, argc=2, ubp_av=0xbffffa84, init=0x8065e10 <_init>, fini=0x81a4f50 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffa7c) at ../sysdeps/generic/libc-start.c:129 (gdb) frame 0 #0 imap_status (stream=0x0, mbx=0x82709b4 "INBOX", flags=31) at imap4r1.c:496 496 if (LEVELSTATUS (stream)) { /* have STATUS command? */ (gdb) frame 1 #1 0x0817ace3 in imap_status (stream=0x826ff30, mbx=0x82709b4 "INBOX", flags=31) at imap4r1.c:490 490 return imap_status (NIL,mbx,flags); (gdb) frame 2 #2 0x08156102 in mail_status (stream=0x826ff30, mbx=0x82709b4 "INBOX", flags=31) at mail.c:936 936 return SAFE_STATUS (dtb,stream,mbx,flags); (gdb) frame 3 #3 0x080f35ab in zif_imap_status (ht=3, return_value=0x826b61c, this_ptr=0x0, return_value_used=1) at php_imap.c:2654 2654 if (mail_status(imap_le_struct->imap_stream, Z_STRVAL_PP(mbx), Z_LVAL_PP(flags))) { (gdb) frame 4 #4 0x0814438b in execute (op_array=0x826b75c) at ./zend_execute.c:1598 1598 ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC); (gdb) frame 5 #5 0x080d01e2 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at zend.c:810 810 zend_execute(EG(active_op_array) TSRMLS_CC); (gdb) frame 6 #6 0x0806da9a in php_execute_script (primary_file=0xbffff9d0) at main.c:1381 1381 retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); the confingure line: ./configure --enable-force-cgi-redirect --enable-sigchild --with-imap --enable-debug