php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77254 increasing number of tests loading wrong extensions
Submitted: 2018-12-06 18:33 UTC Modified: -
From: spam2 at rhsoft dot net Assigned:
Status: Open Package: Dynamic loading
PHP Version: 7.3Git-2018-12-06 (Git) OS:
Private report: No CVE-ID: None
 [2018-12-06 18:33 UTC] spam2 at rhsoft dot net
Description:
------------
an increasing number of tests ignores EXTENSION_DIR and i have written more than one bugreport in the past years (most opnessl tests failing that way) but it becomes worser

damned you have no business tyring to load an extension from /usr/lib64/php/modules when EXTENSION_DIR is defined as well as env-var as in the php.ini given with the initial call because you are testing the wrong binaries all the time an dit only get visible when /usr/lib64 is still the older php minor/major version

what is that hard to respect "-c /home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini" in all subcalls?

-----------------------

export EXTENSION_DIR=/home/builduser/rpmbuild/BUILD/php-7.3.0/modules

sed -i s@__EXTENSION_DIR__@/home/builduser/rpmbuild/BUILD/php-7.3.0/modules@ /home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini

/home/builduser/rpmbuild/BUILD/php-7.3.0/sapi/cli/php -n -c /home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini /home/builduser/rpmbuild/BUILD/php-7.3.0/run-tests.php -n -c /home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini

[06-Dec-2018 18:08:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'readline' (tried: /usr/lib64/php/modules/readline (/usr/lib64/php/modules/readline: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/readline.so (/usr/lib64/php/modules/readline.so: undefined symbol: _array_init)) in Unknown on line 0
[06-Dec-2018 18:08:50 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/lib64/php/modules/phar (/usr/lib64/php/modules/phar: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/phar.so (/usr/lib64/php/modules/phar.so: undefined symbol: _zend_hash_str_add)) in Unknown on line 0
[06-Dec-2018 18:08:36 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'readline' (tried: /usr/lib64/php/modules/readline (/usr/lib64/php/modules/readline: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/readline.so (/usr/lib64/php/modules/readline.so: undefined symbol: _array_init)) in Unknown on line 0
[06-Dec-2018 18:08:36 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'phar' (tried: /usr/lib64/php/modules/phar (/usr/lib64/php/modules/phar: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/phar.so (/usr/lib64/php/modules/phar.so: undefined symbol: _zend_hash_str_add)) in Unknown on line 0

Test script:
---------------
+ ./configure --quiet --host=x86_64-redhat-linux --build=x86_64-redhat-linux --target=x86_64-redhat-linux --prefix=/usr --program-prefix= --libdir=/usr/lib64/php --disable-all --disable-static --enable-shared --enable-apcu=shared --enable-bcmath=shared --enable-calendar=shared --enable-cli --enable-ctype=shared --enable-dom=shared --enable-exif=shared --enable-fileinfo=shared --enable-filter --enable-gcc-global-regs --enable-hash=shared --enable-huge-code-pages --enable-inline-optimization --enable-intl=shared --enable-json=shared --enable-libxml --enable-mbregex --enable-mbstring=shared --enable-mysqlnd=shared --enable-opcache=shared --enable-pcntl=shared --enable-pdo=shared --enable-phar=shared --enable-posix=shared --enable-re2c-cgoto --enable-session=shared --enable-simplexml=shared --enable-soap=shared --enable-sockets=shared --enable-tokenizer=shared --enable-xml=shared --enable-xmlreader=shared --enable-xmlwriter=shared --enable-zip=shared --with-apxs2=/usr/bin/apxs --with-bz2=shared,/usr --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.lounge.d --with-curl=shared,/usr --with-freetype-dir=/usr --with-gd=shared,/usr --with-iconv=shared --with-imap=shared,/usr --with-kerberos=/usr --with-layout=GNU --with-libdir=lib64 --with-libedit=shared,/usr --with-libxml-dir=/usr --with-libzip=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=shared,mysqlnd --with-openssl=shared,/usr --with-pcre-jit --with-pcre-regex=/usr --with-pdo-mysql=shared,mysqlnd --with-pic --with-system-ciphers --with-system-tzdata --with-tidy=shared,/usr --with-zlib-dir=/usr --with-zlib=shared --disable-cgi --disable-dmalloc --disable-dtrace --disable-gcov --disable-gd-jis-conv --disable-ipv6 --disable-mysqlnd-compression-support --disable-opcache-file --disable-phpdbg --disable-rpath --disable-short-tags --disable-debug --without-valgrind --without-pcre-valgrind --disable-valgrind-checks

+ export LANG=C TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.3.0/sapi/cli/php EXTENSION_DIR=/home/builduser/rpmbuild/BUILD/php-7.3.0/modules PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.3.0/modules PHP_INI_PATH=/home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini NO_INTERACTION=1 MALLOC_CHECK_=2 MYSQL_TEST_HOST=localhost MYSQL_TEST_SOCKET=/var/lib/mysql/mysql.sock MYSQL_TEST_PORT=3306 MYSQL_TEST_USER=php_autotest MYSQL_TEST_PASSWD=php_autotest MYSQL_TEST_DB=php_autotest 'PDO_MYSQL_TEST_DSN=mysql:host=localhost;dbname=php_autotest' PDO_MYSQL_TEST_SOCKET=/var/lib/mysql/mysql.sock PDO_MYSQL_TEST_USER=php_autotest PDO_MYSQL_TEST_PASS=php_autotest PDO_MYSQL_TEST_ENGINE=MyISAM REPORT_EXIT_STATUS=0 GLIBC_TUNABLES=glibc.elision.enable=1

[builduser@testserver:/rpmbuild/SPECS]$ cat /home/builduser/rpmbuild/SOURCES/php-debug.ini
[PHP]
max_input_time                   = "-1"
memory_limit                     = "-1"
max_execution_time               = 0
report_memleaks                  = 1

extension_dir                    = "__EXTENSION_DIR__"
extension                        = "zlib"
extension                        = "openssl"
extension                        = "mbstring"
extension                        = "bz2"
extension                        = "calendar"
extension                        = "ctype"
extension                        = "curl"
extension                        = "dom"
extension                        = "exif"
extension                        = "fileinfo"
extension                        = "gd"
extension                        = "hash"
extension                        = "iconv"
extension                        = "imap"
extension                        = "intl"
extension                        = "json"
extension                        = "mysqlnd"
extension                        = "mysqli"
extension                        = "pcntl"
extension                        = "pdo"
extension                        = "pdo_mysql"
extension                        = "phar"
extension                        = "posix"
extension                        = "readline"
extension                        = "session"
extension                        = "simplexml"
extension                        = "soap"
extension                        = "sockets"
extension                        = "tidy"
extension                        = "tokenizer"
extension                        = "xml"
extension                        = "xmlreader"
extension                        = "xmlwriter"
extension                        = "zip"

Expected result:
----------------
working basics like load *all* extnesions from the same directory

Actual result:
--------------
randomly using shared extension from the system instead the current build and there is no single excuse for such a nonsense because simply use "-c /home/builduser/rpmbuild/BUILD/php-7.3.0/tmp-php.ini" from the call would have them all loaded initally here

Patches

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC