Bug #77609 [Com]: Tests from mailparse extension fails
| From: | ralf dot habacker at freenet dot de | Date: | Wed, 13 Feb 2019 00:15:43 +0000 |
| Subject: | Bug #77609 [Com]: Tests from mailparse extension fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-219545@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77609&edit=1
ID: 77609
Comment by: ralf dot habacker at freenet dot de
Reported by: ralf dot habacker at freenet dot de
Summary: Tests from mailparse extension fails
Status: Open
Type: Bug
Package: *Mail Related
Operating System: linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
> PHP_DEPRECATED_DIRECTIVES_REGEX =
> '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
Was the intention perhaps to exclude (zend_extension|extension_debug)?
Changing this lead to the next issue:
At https://github.com/php/php-src/blob/dd8e59da8f5aafd9d77a0f1f17e5e272d09f643f/Makefile.global#L100
there is php called with -d extension_dir=.. expecting installed extensions in a local build dir.
Running make test now returns
Warning: PHP Startup: Unable to load dynamic library
'/home/ralf/src/pecl-mail-mailparse-build/modules/pdo.so' -
/home/ralf/src/pecl-mail-mailparse-build/modules/pdo.so: cannot open shared object file: No such
file or directory in Unknown on line 0
Previous Comments:
------------------------------------------------------------------------
[2019-02-12 23:59:40] ralf dot habacker at freenet dot de
The definition of PHP_DEPRECATED_DIRECTIVES_REGEX is https://github.com/php/php-src/blob/6e3600f41b95d97d11ef48f817e6389a4ee95091/Makefile.global#L86
------------------------------------------------------------------------
[2019-02-12 23:56:33] ralf dot habacker at freenet dot de
> Maybe I'm missing something important, but did you actually build PHP with mbstring
> support?
yes
> Does php -m list mbstring?
yes
The problem is that running 'make test' in a phpize'd build creates a custom php ini
file not including the installed extensions. In principal there is code to include installed php
related config files (see https://github.com/php/php-src/blob/master/Makefile.global#L99),
but extensions are excluded by PHP_DEPRECATED_DIRECTIVES_REGEX, which is
Makefile:130:PHP_DEPRECATED_DIRECTIVES_REGEX =
'^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*='
------------------------------------------------------------------------
[2019-02-12 22:32:39] requinix@php.net
Maybe I'm missing something important, but did you actually build PHP with mbstring support?
Does php -m list mbstring?
------------------------------------------------------------------------
[2019-02-12 22:18:40] ralf dot habacker at freenet dot de
Description:
------------
Running tests from mailparse extensions are skipped because a run time dependency is missing.
Build complete.
Don't forget to run 'make test'.
make test
PHP Warning: Cannot load module 'mailparse' because required module 'mbstring'
is not loaded in Unknown on line 0
PHP Warning: Cannot load module 'mailparse' because required module 'mbstring'
is not loaded in Unknown on line 0
PHP_SAPI : cli
PHP_VERSION : 7.0.7
ZEND_VERSION: 3.0.0
PHP_OS : Linux - Linux bramsche.habacker.de 4.4.165-81-default #1 SMP Mon Dec 3 07:47:23 UTC
2018 (0bfc9ed) x86_64
INI actual : /home/ralf/src/pecl-mail-mailparse-build/tmp-php.ini
More .INIs :
CWD : /home/ralf/src/pecl-mail-mailparse
Extra dirs :
VALGRIND : Not used
=====================================================================
TIME START 2019-02-12 22:02:15
=====================================================================
SKIP Check for mailparse presence [tests/001.phpt]
SKIP Check stream encoding [tests/002.phpt]
SKIP Check handling of multiple To headers [tests/003.phpt]
SKIP Check uudecode_all [tests/004.phpt]
SKIP Check quoted-printable encoding generates S/MIME safe content [tests/005.phpt]
SKIP Check extract_part_file [tests/006.phpt]
SKIP Check RFC822 Conformance [tests/007.phpt]
SKIP OO API Segfault when opening a file is not possible [tests/008.phpt]
SKIP Multiple UUE attachments not recognized [tests/009.phpt]
SKIP Multiple headers not parsed into arra bug #6862 [tests/010.phpt]
SKIP Check mailparse_determine_best_xfer_encoding [tests/011.phpt]
SKIP Check mailparse_mimemessage_extract_uue [tests/012.phpt]
SKIP Check mailparse_mimemessage_extract_uue [tests/013.phpt]
SKIP mailparse_msg_free causes double free segfault [tests/bug001.phpt]
SKIP Parse messages in testdata dir [tests/parse_test_messages.phpt]
=====================================================================
TIME END 2019-02-12 22:02:16
Expected result:
----------------
The tests should should find the required mbstring extension
Actual result:
--------------
The tests could not be started because a required dependency is missing.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77609&edit=1