| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2021-07-30 20:07 UTC] kontakt at xlu dot pl
 Description: ------------ After installation as per the guide: https://github.com/BadChoice/handesk/tree/1.4.2 I am getting the problem: $ php artisan handesk:parseNewEmails In Mailbox.php line 67: Connection error: No such host as smtp.yourmail.com Segmentation fault (core dumped) TB: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000800b499e0 in strncmp () from /lib/libc.so.7 #0 0x0000000800b499e0 in strncmp () from /lib/libc.so.7 #1 0x0000000800b450e8 in getenv () from /lib/libc.so.7 #2 0x00000000004e0ae9 in module_destructor () #3 0x00000000004d7c11 in module_destructor_zval () #4 0x00000000004eac38 in zend_hash_graceful_reverse_destroy () #5 0x00000000004d7d14 in zend_shutdown () #6 0x0000000000473beb in php_module_shutdown () #7 0x0000000000591346 in main () The problem already without full configuration. Just crete database in .env and install on the official readme. The code tested causes a segmentation fault for php versions: 7.2.x, 7.3.x, 7.4.x. Test script: --------------- https://github.com/BadChoice/handesk/tree/1.4.2 Actual result: -------------- Segmentation Fault PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 09:00:01 2025 UTC | 
I did it again with the correct SMTP address: $ php artisan handesk:parseNewEmails Done Segmentation fault (core dumped) Check composer package: ./vendor/php-imap/php-imap/src/PhpImap/Mailbox.php Line: protected function initImapStream() { $imapStream = @imap_open($this->imapPath, $this->imapLogin, $this->imapPassword, $this->imapOptions, $this->imapRetriesNum, $this->imapParams); if(!$imapStream) { throw new Exception('Connection error: ' . imap_last_error()); } return $imapStream; }I can reproduce the segfault: #0 0x00007ffff68b00cd in getenv () from /usr/lib/x86_64-linux-gnu/libc.so.6 #1 0x0000555555871bc6 in zm_shutdown_intl (type=1, module_number=26) at /home/nikic/php/php-7.4/ext/intl/php_intl.c:998 #2 0x0000555555cc004e in module_destructor (module=0x555556a6f210) at /home/nikic/php/php-7.4/Zend/zend_API.c:2563 #3 0x0000555555cb29c4 in module_destructor_zval (zv=0x7fffffffdb20) at /home/nikic/php/php-7.4/Zend/zend.c:768 #4 0x0000555555ccc352 in _zend_hash_del_el_ex (ht=0x555556a2ce00 <module_registry>, idx=25, p=0x555556a76b70, prev=0x0) at /home/nikic/php/php-7.4/Zend/zend_hash.c:1305 #5 0x0000555555ccc431 in _zend_hash_del_el (ht=0x555556a2ce00 <module_registry>, idx=25, p=0x555556a76b70) at /home/nikic/php/php-7.4/Zend/zend_hash.c:1328 #6 0x0000555555ccdd5d in zend_hash_graceful_reverse_destroy (ht=0x555556a2ce00 <module_registry>) at /home/nikic/php/php-7.4/Zend/zend_hash.c:1782 #7 0x0000555555cbdb08 in zend_destroy_modules () at /home/nikic/php/php-7.4/Zend/zend_API.c:1995 #8 0x0000555555cb3181 in zend_shutdown () at /home/nikic/php/php-7.4/Zend/zend.c:1055 #9 0x0000555555c1476b in php_module_shutdown () at /home/nikic/php/php-7.4/main/main.c:2518 #10 0x0000555555d9e7b7 in main (argc=3, argv=0x555556a67c10) at /home/nikic/php/php-7.4/sapi/cli/php_cli.c:1375