php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73609 "run-tests.php" don't respect configuration
Submitted: 2016-11-26 01:16 UTC Modified: 2019-05-27 16:01 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Re-Opened Package: OpenSSL related
PHP Version: 7.0.14 OS: Linux
Private report: No CVE-ID: None
 [2016-11-26 01:16 UTC] spam2 at rhsoft dot net
Description:
------------
most of the stuff runs fine, but on a machine with 7.1.0RC6 installed the test-suite tries to load extensions from the installed binaries up to "--with-config-file-scan-dir" which is simply a no-go when -n  and a cnfig file is specified

that explains now also why for years nmow some mysql-tests are failing with permission-denied - likely some pieces ignore the env-vars

$TEST_PHP_EXECUTABLE -n -c $PWD/tmp-php.ini $PWD/run-tests.php -n -c $PWD/tmp-php.ini

[root@testserver:~]$ cat /rpmbuild/BUILD/php-7.0.14/tmp-php.ini
[PHP]
extension_dir=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules
extension=openssl.so
extension=mbstring.so
extension=calendar.so
extension=ctype.so
extension=curl.so
extension=dom.so
extension=exif.so
extension=fileinfo.so
extension=gd.so
extension=hash.so
extension=iconv.so
extension=json.so
extension=mysqli.so
extension=pcntl.so
extension=pdo.so
extension=pdo_mysql.so
extension=posix.so
extension=session.so
extension=simplexml.so
extension=soap.so
extension=tidy.so
extension=tokenizer.so
extension=xmlreader.so
extension=xmlwriter.so
extension=zip.so
zend_extension=opcache.so


Module compiled with module API=20160303
PHP    compiled with module API=20151012
These options need to match
 in Unknown on line 0
[26-Nov-2016 01:08:17 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/session.so' - /usr/lib64/php/modules/session.so: undefined symbol: php_var_serialize_destroy in Unknown on line 0
[26-Nov-2016 01:08:17 UTC] PHP Warning:  PHP Startup: SimpleXML: Unable to initialize module
Module compiled with module API=20160303
PHP    compiled with module API=20151012



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-26 01:20 UTC] spam2 at rhsoft dot net
the whole part of the SPEC file and since the PGO-profiling-stuff with the same params works perfectly and just get $PWD via cli-param it's for sure the test-suite which is buggy

# run test-suite when enabled
%if %runselftest
 ulimit -s 32712
 unset TZ LANG LC_ALL
 export LANG="C" TEST_PHP_EXECUTABLE="$PWD/sapi/cli/php" 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"
 echo "[PHP]" > "$PWD/tmp-php.ini"
 echo "output_buffering=0" >> "$PWD/tmp-php.ini"
 echo "memory_limit=-1" >> "$PWD/tmp-php.ini"
 echo "extension_dir=$PWD/modules" >> "$PWD/tmp-php.ini"
 echo "extension=openssl.so" >> "$PWD/tmp-php.ini"
 echo "extension=mbstring.so" >> "$PWD/tmp-php.ini"
 echo "extension=calendar.so" >> "$PWD/tmp-php.ini"
 echo "extension=ctype.so" >> "$PWD/tmp-php.ini"
 echo "extension=curl.so" >> "$PWD/tmp-php.ini"
 echo "extension=dom.so" >> "$PWD/tmp-php.ini"
 echo "extension=exif.so" >> "$PWD/tmp-php.ini"
 echo "extension=fileinfo.so" >> "$PWD/tmp-php.ini"
 echo "extension=gd.so" >> "$PWD/tmp-php.ini"
 echo "extension=hash.so" >> "$PWD/tmp-php.ini"
 echo "extension=iconv.so" >> "$PWD/tmp-php.ini"
 echo "extension=json.so" >> "$PWD/tmp-php.ini"
 echo "extension=mysqli.so" >> "$PWD/tmp-php.ini"
 echo "extension=pcntl.so" >> "$PWD/tmp-php.ini"
 echo "extension=pdo.so" >> "$PWD/tmp-php.ini"
 echo "extension=pdo_mysql.so" >> "$PWD/tmp-php.ini"
 echo "extension=posix.so" >> "$PWD/tmp-php.ini"
 echo "extension=session.so" >> "$PWD/tmp-php.ini"
 echo "extension=simplexml.so" >> "$PWD/tmp-php.ini"
 echo "extension=soap.so" >> "$PWD/tmp-php.ini"
 echo "extension=tidy.so" >> "$PWD/tmp-php.ini"
 echo "extension=tokenizer.so" >> "$PWD/tmp-php.ini"
 echo "extension=xmlreader.so" >> "$PWD/tmp-php.ini"
 echo "extension=xmlwriter.so" >> "$PWD/tmp-php.ini"
 echo "extension=zip.so" >> "$PWD/tmp-php.ini"
 echo "zend_extension=opcache.so" >> "$PWD/tmp-php.ini"
 $TEST_PHP_EXECUTABLE -n -c $PWD/tmp-php.ini $PWD/run-tests.php -n -c $PWD/tmp-php.ini
 find /var/www/sessiondata -user builduser -delete
%endif
 [2016-11-26 01:42 UTC] spam2 at rhsoft dot net
well, that's the full call

how comes the test-suite to the foolish idea trying to load "apcu.so" at all - problm is with 7.1 on the host-machine that problems only becomes obvious while in fact some pieces of the tests are never use the fresh built extensions but the old installed ones which you don't notice when they are available and from the same major version

[26-Nov-2016 01:36:27 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apcu.so' - /usr/lib64/php/modules/apcu.so: undefined symbol: zend_signal_globals in Unknown on line 0
___________________________

+ LANG=C
+ TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php
+ 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
+ echo '[PHP]'
+ echo output_buffering=0
+ echo memory_limit=-1
+ echo extension_dir=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/openssl.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/mbstring.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/calendar.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/ctype.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/curl.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/dom.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/exif.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/fileinfo.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/gd.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/hash.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/iconv.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/json.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/mysqli.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/pcntl.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/pdo.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/pdo_mysql.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/posix.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/session.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/simplexml.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/soap.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/tidy.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/tokenizer.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/xmlreader.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/xmlwriter.so
+ echo extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/zip.so
+ echo zend_extension=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/opcache.so
+ /home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini /home/builduser/rpmbuild/BUILD/php-7.0.14/run-tests.php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
 [2016-11-26 11:34 UTC] spam2 at rhsoft dot net
-Summary: "run-tests.php" donÄt respect configuration +Summary: "run-tests.php" don't respect configuration
 [2016-11-26 11:34 UTC] spam2 at rhsoft dot net
ok, you finally can trick it out by "export PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14" meaning point to the dirctory with the temporary ini-file
___________________________________________________

but that's implied by -n and should not be needed

php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
___________________________________________________

+ ulimit -s 32712
+ unset TZ LANG LC_ALL
+ export LANG=C TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php 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
+ LANG=C
+ TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php
+ 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
+ cp /home/builduser/rpmbuild/SOURCES/php-debug.ini /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
+ EXTENSION_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules
+ export PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14
+ PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14
+ sed -i s@__EXTENSION_DIR__@/home/builduser/rpmbuild/BUILD/php-7.0.14/modules@ /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
+ /home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini /home/builduser/rpmbuild/BUILD/php-7.0.14/run-tests.php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini

=====================================================================
PHP         : /home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php 
PHP_SAPI    : cli
PHP_VERSION : 7.0.14RC1
ZEND_VERSION: 3.0.0
PHP_OS      : Linux - Linux testserver.rhsoft.net 4.8.10-200.fc24.x86_64 #1 SMP Mon Nov 21 17:55:46 UTC 2016 x86_64
INI actual  : /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
More .INIs  :   
CWD         : /home/builduser/rpmbuild/BUILD/php-7.0.14
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2016-11-26 11:20:36
=====================================================================


[root@testserver:~]$ cat /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
[PHP]
extension_dir                    = "/home/builduser/rpmbuild/BUILD/php-7.0.14/modules"

extension                        = "mbstring.so"
extension                        = "openssl.so"
extension                        = "calendar.so"
extension                        = "ctype.so"
extension                        = "curl.so"
extension                        = "dom.so"
extension                        = "exif.so"
extension                        = "fileinfo.so"
extension                        = "gd.so"
extension                        = "hash.so"
extension                        = "iconv.so"
extension                        = "imap.so"
extension                        = "json.so"
extension                        = "mysqli.so"
extension                        = "pcntl.so"
extension                        = "pdo.so"
extension                        = "pdo_mysql.so"
extension                        = "posix.so"
extension                        = "session.so"
extension                        = "simplexml.so"
extension                        = "soap.so"
extension                        = "sockets.so"
extension                        = "tidy.so"
extension                        = "tokenizer.so"
extension                        = "xmlreader.so"
extension                        = "xmlwriter.so"
extension                        = "zip.so"
extension                        = "phar.so"

[zend]
zend_extension                   = "opcache.so"
opcache.enable                   = 1
opcache.enable_cli               = 0
opcache.load_comments            = 0
opcache.save_comments            = 0
opcache.use_cwd                  = 1
opcache.validate_timestamps      = 1
opcache.revalidate_freq          = 10
opcache.revalidate_path          = 0
opcache.max_accelerated_files    = 1000
opcache.memory_consumption       = 32
opcache.interned_strings_buffer  = 8
opcache.max_file_size            = 262144
opcache.enable_file_override     = 1
opcache.fast_shutdown            = 1
opcache.log_verbosity_level      = 1
opcache.huge_code_pages          = 0
 [2016-12-08 19:13 UTC] spam2 at rhsoft dot net
-PHP Version: 7.0.14RC1 +PHP Version: 7.0.14
 [2016-12-08 19:13 UTC] spam2 at rhsoft dot net
dmaned with 7.0.14 final even that don't work relieable - some stuff is *clearly* using /etc/php.ini which is the only place where "extension = vld.so" exists on the whole machine and finally a ton of openssl related test are faling - most likely because loading extensions from somewhere but not the build directory

#46127, openssl_sign/verify: accept different algos [ext/openssl/tests/bug46127.phpt]
Bug #48182: ssl handshake fails during asynchronous socket connection [ext/openssl/tests/bug48182.phpt]
Bug #54992: Stream not closed and error not returned when SSL CN_match fails [ext/openssl/tests/bug54992.phpt]
Bug #65538: SSL context "cafile" supports stream wrappers [ext/openssl/tests/bug65538_001.phpt]
Bug #65538: SSL context "cafile" supports phar wrapper [ext/openssl/tests/bug65538_003.phpt]
Bug #65729: CN_match gives false positive when wildcard is used [ext/openssl/tests/bug65729.phpt]
Bug #68265: SAN match fails with trailing DNS dot [ext/openssl/tests/bug68265.phpt]
Bug #68879: Match IP address fields in subjectAltName checks [ext/openssl/tests/bug68879.phpt]
Bug #68920: peer_fingerprint input checks should be strict [ext/openssl/tests/bug68920.phpt]
Bug #69215: Crypto servers should send client CA list [ext/openssl/tests/bug69215.phpt]
capture_peer_cert context captures on verify failure [ext/openssl/tests/capture_peer_cert_001.phpt]
Testing peer fingerprint on connection [ext/openssl/tests/openssl_peer_fingerprint_basic.phpt]
Peer verification enabled for client streams [ext/openssl/tests/peer_verification.phpt]
Peer verification matches SAN names [ext/openssl/tests/san_peer_matching.phpt]
Capture SSL session meta array in stream context [ext/openssl/tests/session_meta_capture.phpt]
sni_server [ext/openssl/tests/sni_server.phpt]
Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt]
TLSv1.1 and TLSv1.2 bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_002.phpt]
Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]
Specific protocol method specification [ext/openssl/tests/stream_crypto_flags_004.phpt]
Verify host name by default in client transfers [ext/openssl/tests/stream_verify_peer_name_001.phpt]
Allow host name mismatch when "verify_host" disabled [ext/openssl/tests/stream_verify_peer_name_002.phpt]
Host name mismatch triggers error [ext/openssl/tests/stream_verify_peer_name_003.phpt]
Specific crypto method for ssl:// transports. [ext/openssl/tests/streams_crypto_method.phpt]
tlsv1.0 stream wrapper [ext/openssl/tests/tlsv1.0_wrapper.phpt]
tlsv1.1 stream wrapper [ext/openssl/tests/tlsv1.1_wrapper.phpt]
tlsv1.2 stream wrapper [ext/openssl/tests/tlsv1.2_wrapper.phpt]
Bug #73037 SoapServer reports Bad Request when gzipped, var 0 [ext/soap/tests/bug73037.phpt]
proc_open() with > 16 pipes [ext/standard/tests/general_functions/proc_open_pipes1.phpt]
proc_open() with no pipes [ext/standard/tests/general_functions/proc_open_pipes2.phpt]
proc_open() with invalid pipes [ext/standard/tests/general_functions/proc_open_pipes3.phpt]
Bug #51800 proc_open on Windows hangs forever, the right way to do it [ext/standard/tests/streams/proc_open_bug51800_right.phpt]
Bug #51800 proc_open on Windows hangs forever, the right way to do it with more data [ext/standard/tests/streams/proc_open_bug51800_right2.phpt]
Bug #69900 Commandline input/output weird behaviour with STDIO [ext/standard/tests/streams/proc_open_bug69900.phpt]
CLI -a and libedit [sapi/cli/tests/017.phpt]

+ export LANG=C TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14 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
+ LANG=C
+ TEST_PHP_EXECUTABLE=/home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php
+ PHP_INI_SCAN_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14
+ 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
+ cp /home/builduser/rpmbuild/SOURCES/php-debug.ini /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
+ EXTENSION_DIR=/home/builduser/rpmbuild/BUILD/php-7.0.14/modules
+ sed -i s@__EXTENSION_DIR__@/home/builduser/rpmbuild/BUILD/php-7.0.14/modules@ /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
+ /home/builduser/rpmbuild/BUILD/php-7.0.14/sapi/cli/php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini /home/builduser/rpmbuild/BUILD/php-7.0.14/run-tests.php -n -c /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
_____________________________

[root@testserver:~]$ cat /home/builduser/rpmbuild/BUILD/php-7.0.14/tmp-php.ini
[PHP]
max_input_time                   = "-1"
memory_limit                     = "-1"
max_execution_time               = 0

extension_dir                    = "/home/builduser/rpmbuild/BUILD/php-7.0.14/modules"

extension                        = "mbstring.so"
extension                        = "openssl.so"
extension                        = "calendar.so"
extension                        = "ctype.so"
extension                        = "curl.so"
extension                        = "dom.so"
extension                        = "exif.so"
extension                        = "fileinfo.so"
extension                        = "gd.so"
extension                        = "hash.so"
extension                        = "iconv.so"
extension                        = "imap.so"
extension                        = "json.so"
extension                        = "mysqli.so"
extension                        = "pcntl.so"
extension                        = "pdo.so"
extension                        = "pdo_mysql.so"
extension                        = "posix.so"
extension                        = "session.so"
extension                        = "simplexml.so"
extension                        = "soap.so"
extension                        = "sockets.so"
extension                        = "tidy.so"
extension                        = "tokenizer.so"
extension                        = "xmlreader.so"
extension                        = "xmlwriter.so"
extension                        = "zip.so"
extension                        = "phar.so"

[zend]
zend_extension                   = "opcache.so"
opcache.enable                   = 1
opcache.enable_cli               = 0
opcache.load_comments            = 0
opcache.save_comments            = 0
opcache.use_cwd                  = 1
opcache.validate_timestamps      = 1
opcache.revalidate_freq          = 10
opcache.revalidate_path          = 0
opcache.max_accelerated_files    = 1000
opcache.memory_consumption       = 32
opcache.interned_strings_buffer  = 8
opcache.max_file_size            = 262144
opcache.enable_file_override     = 1
opcache.fast_shutdown            = 1
opcache.log_verbosity_level      = 1
opcache.huge_code_pages          = 0
_____________________________

[08-Dec-2016 19:06:06 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:06 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:06 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:06:07 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:07 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:07 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:06:08 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:08 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:08 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:46 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:06:47 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:06:47 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:06:47 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:07:40 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:07:40 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:07:40 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library '/home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so' - /home/builduser/rpmbuild/BUILD/php-7.0.14/modules/vld.so: cannot open shared object file: No such file or directory in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'tokenizer' already loaded in Unknown on line 0
[08-Dec-2016 19:07:41 UTC] PHP Warning:  Module 'Phar' already loaded in Unknown on line 0
 [2016-12-08 19:47 UTC] spam2 at rhsoft dot net
[08-Dec-2016 20:42:33 Europe/Vienna] PHP Warning: stream_socket_server(): unable to connect to ssl://127.0.0.1:64321 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
_______________________________

no i did not - you just forgot to respect the environment and configuration here and there and since you used /etc/php.ini there which is from production and not the current build (where extensions are loeded in /etc/php.d/) you just did not load the extension at that point
_______________________________

cat /rpmbuild/BUILD/php-7.0.14/tmp-php.ini | grep openssl
extension = "openssl.so"
 [2017-01-06 23:56 UTC] spam2 at rhsoft dot net
anybody out there?

obviously only openssl related stuff is affected while other tests are fine
 [2017-01-07 16:42 UTC] cmb@php.net
> $TEST_PHP_EXECUTABLE -n -c $PWD/tmp-php.ini $PWD/run-tests.php -n -c $PWD/tmp-php.ini

Why don't you use `make test` instead?
 [2017-01-07 16:54 UTC] spam2 at rhsoft dot net
because it has nothing better to do than copy the damned /etc/php.ini from the production system to $PWD/tmp-php.ini for *everything* and not only the few openssl related things which are failing currently

also it is far away from beauty because when you look at "ps aux" it translates to "$TEST_PHP_EXECUTABLE $PWD/run-tests.php -d extension=x -d extension=y -d extension=z 

these are clearly bugs and become only visible when "run-tests.php" is running with intermediate binaries which can't run with system configs because not all 3rd party extensions are avaible at that point in time and the systems php config refelects production environment while "run-tests.php" is suppsoed to test the compiled binaries long before the rpm-üackage is finished
 [2017-01-08 23:10 UTC] cmb@php.net
> these are clearly bugs […]

I don't have the time to have a closer look at this, but patches
(preferably as pull request) are most certainly welcome. :-)
 [2017-01-09 10:09 UTC] spam2 at rhsoft dot net
can you reasign it to the openssl component since it's the only one affected?
 [2017-01-09 11:08 UTC] cmb@php.net
-Package: Testing related +Package: OpenSSL related
 [2017-01-09 18:50 UTC] bukka@php.net
-Package: OpenSSL related +Package: Dynamic loading
 [2017-01-09 18:50 UTC] bukka@php.net
I think that this is more about dynamic loading. There really isn't anything that could be fixed in ext/openssl as far as I understand the description.
 [2017-01-09 18:50 UTC] bukka@php.net
I think that this is more about dynamic loading. There really isn't anything that could be fixed in ext/openssl as far as I understand the description.
 [2017-01-10 01:59 UTC] spam2 at rhsoft dot net
The test calls needs to be fixed - if they would act like 12000 other tests and respect the commandline of the initial call it would be loaded and present the same way as it would when compiled static instead as loadable extensions 

The openssl tests must not use a different configuration then others 

And since every extension here is built shared and shipped with its own rpm package there is no point handle that differently
 [2017-02-01 13:17 UTC] spam2 at rhsoft dot net
frankly there are 15000 tests and only the openssl specific ones behave braindead by ignore the configuration and that still continues with 7.1.2RC1

#46127, openssl_sign/verify: accept different algos [ext/openssl/tests/bug46127.phpt]
Bug #48182: ssl handshake fails during asynchronous socket connection [ext/openssl/tests/bug48182.phpt]
Bug #54992: Stream not closed and error not returned when SSL CN_match fails [ext/openssl/tests/bug54992.phpt]
Bug #65538: SSL context "cafile" supports stream wrappers [ext/openssl/tests/bug65538_001.phpt]
Bug #65538: SSL context "cafile" supports phar wrapper [ext/openssl/tests/bug65538_003.phpt]
Bug #65729: CN_match gives false positive when wildcard is used [ext/openssl/tests/bug65729.phpt]
Bug #68265: SAN match fails with trailing DNS dot [ext/openssl/tests/bug68265.phpt]
Bug #68879: Match IP address fields in subjectAltName checks [ext/openssl/tests/bug68879.phpt]
Bug #68920: peer_fingerprint input checks should be strict [ext/openssl/tests/bug68920.phpt]
Bug #69215: Crypto servers should send client CA list [ext/openssl/tests/bug69215.phpt]
capture_peer_cert context captures on verify failure [ext/openssl/tests/capture_peer_cert_001.phpt]
Testing peer fingerprint on connection [ext/openssl/tests/openssl_peer_fingerprint_basic.phpt]
Peer verification enabled for client streams [ext/openssl/tests/peer_verification.phpt]
Peer verification matches SAN names [ext/openssl/tests/san_peer_matching.phpt]
Capture SSL session meta array in stream context [ext/openssl/tests/session_meta_capture.phpt]
sni_server [ext/openssl/tests/sni_server.phpt]
Basic bitwise stream crypto context flag assignment [ext/openssl/tests/stream_crypto_flags_001.phpt]
TLSv1.1 and TLSv1.2 bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_002.phpt]
Server bitwise stream crypto flag assignment [ext/openssl/tests/stream_crypto_flags_003.phpt]
Specific protocol method specification [ext/openssl/tests/stream_crypto_flags_004.phpt]
Verify host name by default in client transfers [ext/openssl/tests/stream_verify_peer_name_001.phpt]
Allow host name mismatch when "verify_host" disabled [ext/openssl/tests/stream_verify_peer_name_002.phpt]
Host name mismatch triggers error [ext/openssl/tests/stream_verify_peer_name_003.phpt]
Specific crypto method for ssl:// transports. [ext/openssl/tests/streams_crypto_method.phpt]
tlsv1.0 stream wrapper [ext/openssl/tests/tlsv1.0_wrapper.phpt]
tlsv1.1 stream wrapper [ext/openssl/tests/tlsv1.1_wrapper.phpt]
tlsv1.2 stream wrapper [ext/openssl/tests/tlsv1.2_wrapper.phpt]
 [2017-03-17 19:24 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2017-03-17 19:24 UTC] bukka@php.net
I'm really not able to recreate this but from the description it seems to me like there is some mess up in your build and possibly loaded paths.

Are you able to provide a script with a build steps how to recreate it. If you are able to do it in Dockerfile or in Vagrant that would be really helpful. Otherwise I'm not how to help...
 [2017-03-18 10:41 UTC] spam2 at rhsoft dot net
and you did build openssl as shared extension instead bundeled in the php binary?

[builduser@testserver:~]$ cat /rpmbuild/SPECS/php.spec 
Version: 7.1.3

# command 'rpmbuild -bb php.spec --with production' will tune for current hardware while default stays 'sandybridge'
# macro 'php_debug_build' is global (/home/builduser/.rpmmacros) and re-used for pecl-builds while 'debug_build' is local

%global dist          fc%fedora.%(echo $(/usr/bin/date +%Y%m%d.%H%M)).rh
%global phpver        7
%global runselftest   0
%global pgo_build     1
%global lto_build     0
%global break_build   0
%global debug_build   0
%global extension_dir %{_libdir}/%{name}/modules

%if %{?_with_production:1}%{!?_with_production:0}
 %global mtune native
 %global php_native_release 1
%else
 %global mtune sandybridge
 %global php_native_release 0
%endif

%if %php_debug_build
 %global _include_minidebuginfo 1
 %global RH_GCC_DEBUG_OPTION "-g3"
 %global RH_CONFIGURE_DEBUG_OPTION "enable-debug"
 %global RH_STRIP_BINARY 0
 %global pgo_build 0
 %global lto_build 0
%else
 %if %debug_build
  %global _include_minidebuginfo 1
  %global RH_GCC_DEBUG_OPTION "-g3"
  %global RH_CONFIGURE_DEBUG_OPTION "enable-debug"
  %global RH_STRIP_BINARY 0
  %global pgo_build 0
  %global lto_build 0
 %else                                                                                                                                                                                                             
  %global _include_minidebuginfo 0                                                                                                                                                                                 
  %global RH_GCC_DEBUG_OPTION "-g0"                                                                                                                                                                                
  %global RH_CONFIGURE_DEBUG_OPTION "disable-debug"                                                                                                                                                                
  %global RH_STRIP_BINARY 1                                                                                                                                                                                        
 %endif                                                                                                                                                                                                            
%endif                                                                                                                                                                                                             
                                                                                                                                                                                                                   
%if %lto_build                                                                                                                                                                                                     
 %global RH_LTO_CONFIGURE_OPTION "disable-gcc-global-regs"                                                                                                                                                         
%else                                                                                                                                                                                                              
 %global RH_LTO_CONFIGURE_OPTION "enable-gcc-global-regs"                                                                                                                                                          
%endif

Summary:        PHP - CFLAGS: '-m64 -O3 -mfpmath=sse -mavx -msse2avx -march=%{mtune} -mtune=%{mtune} -D_FORTIFY_SOURCE=2 -fgraphite-identity -fipa-pta -fira-loop-pressure -fivopts -floop-block -floop-unroll-and-jam -fmerge-all-constants -fomit-frame-pointer -fopenmp -fsemantic-interposition -fstack-protector --param=ssp-buffer-size=8 -fstrict-aliasing -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -fvariable-expansion-in-unroller -fvect-cost-model=unlimited -fwrapv -g0 -minline-all-stringops -pipe -fno-align-labels -fno-exceptions -fno-gcse -fno-math-errno -fno-lto -fuse-ld=gold -fuse-linker-plugin -fprofile-use -Wformat -Werror=format-security -Wno-stack-protector -Wstrict-aliasing -Wa,--noexecstack'
Name:           php
Release:        1.%{php_native_release}.%{?dist}.%{mtune}
License:        PHP/Zend/BSD
Group:          Development/Languages
URL:            https://secure.php.net/
Source0:        php-%{version}.tar.xz
Source1:        opcache-zendoptimizer.php
Source2:        php-httpd-dummy.conf
Source3:        php-disabled-autotests.txt
Source4:        php-test-dirs.txt
Source5:        php-debug.ini
Patch1:         php-realpath-cache-openbasedir.patch
Patch2:         php-70-systzdata.patch
Patch3:         php-71-systzdata.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  binutils
BuildRequires:  bison
BuildRequires:  bzip2-devel
BuildRequires:  curl-devel
BuildRequires:  cyrus-sasl-devel
BuildRequires:  freetype-devel
BuildRequires:  gcc-c++
BuildRequires:  gd-devel
BuildRequires:  gettext-devel
BuildRequires:  httpd-devel
BuildRequires:  krb5-devel
BuildRequires:  libc-client-devel
BuildRequires:  libedit-devel
BuildRequires:  libicu-devel
BuildRequires:  libjpeg-turbo-devel
BuildRequires:  libpng-devel
BuildRequires:  libstdc++-devel
BuildRequires:  libtidy-devel
BuildRequires:  libtool-ltdl-devel
BuildRequires:  libxml2-devel
BuildRequires:  libzip-devel
BuildRequires:  openssl-devel
BuildRequires:  pam-devel
BuildRequires:  pcre-devel
BuildRequires:  perl
BuildRequires:  postfix
BuildRequires:  re2c
BuildRequires:  zlib-devel
Provides:       mod_%{name}
Requires:       %{name}-common

%description
PHP Scripting Language

%package        common
Summary:        common files

%package        cli
Summary:        command-line interface for php
Requires:       %{name}-common
Provides:       %{name}-cgi

%package        devel
Summary:        files needed for building extensions
Requires:       autoconf, automake, pcre-devel, re2c, %{name}-cli

%package        bcmath
Summary:        bcmath

%package        bz2
Summary:        bz2

%package        calendar
Summary:        calendar

%package        ctype
Summary:        ctype

%package        curl
Summary:        curl

%package        dom
Summary:        dom

%package        exif
Summary:        exif

%package        fileinfo
Summary:        fileinfo

%package        gd
Summary:        gd

%package        gettext
Summary:        gettext

%package        hash
Summary:        hash

%package        iconv
Summary:        iconv

%package        imap
Summary:        imap

%package        intl
Summary:        intl

%package        json
Summary:        json

%package        mbstring
Summary:        mbstring

%package        mysqli
Summary:        mysqli

%package        opcache
Summary:        opcache

%package        openssl
Summary:        openssl

%package        pcntl
Summary:        pcntl

%package        pdo
Summary:        pdo

%package        phar
Summary:        phar

%package        posix
Summary:        posix

%package        readline
Summary:        readline

%package        session
Summary:        session

%package        simplexml
Summary:        simplexml

%package        soap
Summary:        soap

%package        sockets
Summary:        socket

%package        tidy
Summary:        tidy

%package        tokenizer
Summary:        tokenizer

%package        xmlreader
Summary:        xmlreader

%package        xmlwriter
Summary:        xmlwriter

%package        zip
Summary:        zip

# https://bugzilla.redhat.com/show_bug.cgi?id=1371549
%description    bcmath
%description    bz2
%description    calendar
%description    cli
%description    common
%description    ctype
%description    curl
%description    devel
%description    dom
%description    exif
%description    fileinfo
%description    gd
%description    gettext
%description    hash
%description    iconv
%description    imap
%description    intl
%description    json
%description    mbstring
%description    mysqli
%description    opcache
%description    openssl
%description    pcntl
%description    pdo
%description    phar
%description    posix
%description    readline
%description    session
%description    simplexml
%description    soap
%description    sockets
%description    tidy
%description    tokenizer
%description    xmlreader
%description    xmlwriter
%description    zip

%prep
%setup -q -n php-%{version}
%patch1 -p1 -b .realpath
%if "%{version}" >= "7.1.0"
%patch3 -p1 -b .systzdata-71
%else
%patch2 -p1 -b .systzdata-70
%endif

# generate 'data_file.c' from bundeled libmagic with current system data
# /usr/bin/php ext/fileinfo/create_data_file.php /usr/share/misc/magic.mgc > ext/fileinfo/data_file.c

# drop windows specific headers and fix bogus permissions
rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h
find . -name \*.[ch] -exec chmod 644 {} \;

# delete known failing or skipped tests
%if %runselftest
 xargs rm -f < %{SOURCE3}
 rm -rf ext/openssl/tests/
%else
 xargs rm -rf < %{SOURCE4}
%endif

%build
# force use of system libtool and regenerate configure scripts
libtoolize --force --copy --quiet
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 > build/libtool.m4
touch configure.in
./buildconf --force

# compiler and linker flags
%if %lto_build
 RH_LTO_FLAGS="-flto -fno-fat-lto-objects -fuse-ld=gold -fuse-linker-plugin"
%else
 RH_LTO_FLAGS="-fno-lto -fuse-ld=gold -fuse-linker-plugin"
%endif
%if %debug_build
 export CFLAGS="-m64 -O0 %{RH_GCC_DEBUG_OPTION} -fno-lto"
%else
 %if %php_debug_build
  export CFLAGS="-m64 -O0 %{RH_GCC_DEBUG_OPTION} -fno-lto"
 %else
   %if %pgo_build
    export CFLAGS="-m64 -O3 -mfpmath=sse -mavx -msse2avx -march=%{mtune} -mtune=%{mtune} -D_FORTIFY_SOURCE=2 -fgraphite-identity -fipa-pta -fira-loop-pressure -fivopts -floop-block -floop-unroll-and-jam -fmerge-all-constants -fomit-frame-pointer -fopenmp -fsemantic-interposition -fstack-protector --param=ssp-buffer-size=8 -fstrict-aliasing -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -fvariable-expansion-in-unroller -fvect-cost-model=unlimited -fwrapv %{RH_GCC_DEBUG_OPTION} -minline-all-stringops -pipe -fno-align-labels -fno-exceptions -fno-gcse -fno-math-errno $RH_LTO_FLAGS -Wformat -Werror=format-security -Wno-stack-protector -Wstrict-aliasing -Wa,--noexecstack"
   %else
    export CFLAGS="-m64 -O3 -mfpmath=sse -mavx -msse2avx -march=%{mtune} -mtune=%{mtune} -D_FORTIFY_SOURCE=2 -fivopts -fmerge-all-constants -fomit-frame-pointer -fopenmp -fstack-protector --param=ssp-buffer-size=8 -fstrict-aliasing -fwrapv -fno-align-labels -fno-exceptions -fno-gcse -fno-gcse-after-reload -fno-inline-functions -fno-ipa-cp -fno-ipa-cp-clone -fno-ipa-pta -fno-math-errno -fno-peel-loops -fno-predictive-commoning -fno-semantic-interposition -fno-tree-loop-distribute-patterns -fno-tree-loop-distribution -fno-tree-loop-if-convert -fno-tree-loop-if-convert-stores -fno-tree-loop-im -fno-tree-loop-ivcanon -fno-unroll-loops -fno-unswitch-loops -fno-variable-expansion-in-unroller %{RH_GCC_DEBUG_OPTION} -minline-all-stringops -pipe $RH_LTO_FLAGS -Wformat -Werror=format-security -Wno-stack-protector -Wstrict-aliasing -Wa,--noexecstack"
   %endif
 %endif
%endif
export CC="gcc $CFLAGS"
export CXXFLAGS="$CFLAGS"
export CXX="gcc $CFLAGS"
export SH_LDFLAGS="-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump $CFLAGS"
export LDFLAGS="$SH_LDFLAGS -pie -fPIE"

# define extension directory
export EXTENSION_DIR=%{extension_dir}

# configure build process
./configure --quiet \
 --host=x86_64-redhat-linux \
 --build=x86_64-redhat-linux \
 --target=x86_64-redhat-linux \
 --prefix=%{_prefix} \
 --program-prefix= \
 --libdir=%{_libdir}/%{name} \
 --disable-all \
 --enable-bcmath=shared \
 --enable-calendar=shared \
 --enable-cli \
 --enable-ctype=shared \
 --enable-dom=shared \
 --enable-exif=shared \
 --enable-fileinfo=shared \
 --enable-filter \
 --enable-gd-native-ttf \
 --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 \
 --enable-opcache=shared \
 --enable-pcntl=shared \
 --enable-pdo=shared \
 --enable-phar=shared \
 --enable-posix=shared \
 --enable-re2c-cgoto \
 --enable-session=shared \
 --enable-shared \
 --enable-simplexml=shared \
 --enable-soap=shared \
 --enable-sockets=shared \
 --enable-tokenizer=shared \
 --enable-xml \
 --enable-xmlreader=shared \
 --enable-xmlwriter=shared \
 --enable-zip=shared \
 --with-apxs2=%{_bindir}/apxs \
 --with-bz2=shared,%{_prefix} \
 --with-config-file-path=%{_sysconfdir} \
 --with-config-file-scan-dir=%{_sysconfdir}/%{name}.lounge.d \
 --with-curl=shared,%{_prefix} \
 --with-freetype-dir=%{_prefix} \
 --with-gd=shared,%{_prefix} \
 --with-gettext=shared,%{_prefix} \
 --with-iconv=shared \
 --with-imap-ssl=%{_prefix} \
 --with-imap=shared,%{_prefix} \
 --with-kerberos=%{_prefix} \
 --with-layout=GNU \
 --with-libdir=%{_lib} \
 --with-libedit=shared,%{_prefix} \
 --with-libxml-dir=%{_prefix} \
 --with-libzip=%{_prefix} \
 --with-mysql-sock=%{_sharedstatedir}/mysql/mysql.sock \
 --with-mysqli=shared,mysqlnd \
 --with-openssl=shared,%{_prefix} \
 --with-pcre-jit \
 --with-pcre-regex=%{_prefix} \
 --with-pdo-mysql=shared,mysqlnd \
 --with-pic \
 --with-system-ciphers \
 --with-system-tzdata \
 --with-tidy=shared,%{_prefix} \
 --with-zlib \
 --with-zlib-dir=%{_prefix} \
 --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-static \
 --%{RH_LTO_CONFIGURE_OPTION} \
 --%{RH_CONFIGURE_DEBUG_OPTION}
if test $? != 0; then
 tail -500 config.log
 : configure failed
 exit 1
fi

# build php with 'profile-guided-optimization' when enabled
%if %pgo_build
 make %{?_smp_mflags} prof-gen
 /usr/bin/bash /rpmbuild/PHP-PGO/profile.sh --php_build $PWD
 make prof-clean
 make %{?_smp_mflags} prof-use
%else
 make %{?_smp_mflags}
%endif

# run profiling code for debug builds
%if %debug_build
 /usr/bin/bash /rpmbuild/PHP-PGO/profile.sh --php_build $PWD valgrind
%endif

# stop rpmbuild and output infos for usage of the temporary binaries
%if %break_build
 cp %{SOURCE5} "$PWD/php-debug.ini" > /dev/null
 EXTENSION_DIR="$PWD/modules"
 sed -i "s@__EXTENSION_DIR__@$EXTENSION_DIR@" "$PWD/php-debug.ini"
 echo -e "\n\n\e[1;31mBREAK-BUILD ENABLED\e[0m\n\n\e[1;32mPLEASE RUN:\e[0m    export PHP_INI_SCAN_DIR=$PWD\n\e[1;32mCLI-BINARY:\e[0m    $PWD/sapi/cli/php\n\e[1;32mAPACHE-MODULE:\e[0m $PWD/libs/libphp7.so\n\e[1;32mWEBSERVER:    \e[0m http://localhost:9000\n"
 /usr/bin/bash /rpmbuild/PHP-PGO/profile.sh  --php_build $PWD --webserveronly 1
 exit 1
%endif

# run test-suite when enabled
%if %runselftest
 ulimit -s 32712
 unset TZ LANG LC_ALL
 export LANG="C" TEST_PHP_EXECUTABLE="$PWD/sapi/cli/php" EXTENSION_DIR="$PWD/modules" PHP_INI_SCAN_DIR="$PWD/modules" PHP_INI_PATH="$PWD/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"
 cp %{SOURCE5} "$PWD/tmp-php.ini" > /dev/null
 sed -i "s@__EXTENSION_DIR__@$EXTENSION_DIR@" "$PWD/tmp-php.ini"
 $TEST_PHP_EXECUTABLE -n -c $PWD/tmp-php.ini $PWD/run-tests.php -n -c $PWD/tmp-php.ini
 find /var/www/sessiondata -user builduser -delete
%endif

%install
install -m 0755 -d %{buildroot}%{_sysconfdir} %{buildroot}%{_sysconfdir}/httpd/conf %{buildroot}%{_libdir}/httpd/modules %{buildroot}%{_datadir}/%{name}
install -m 0644 %{SOURCE1} %{buildroot}%{_datarootdir}/%{name}/zendoptimizer.php
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf/httpd.conf
INSTALL_ROOT=%{buildroot} make install

# remove unpackaged files
rm -rf %{buildroot}%{extension_dir}/*.a %{buildroot}%{_bindir}/{phptar} %{buildroot}%{_datadir}/pear %{buildroot}%{_libdir}/libphp%{phpver}.la %{buildroot}%{_mandir} %{buildroot}%{_sysconfdir}/httpd %{buildroot}%{_bindir}/phar %{buildroot}%{_bindir}/phar.phar

# strip binaries for non-debug builds
%if %RH_STRIP_BINARY
 strip -s --strip-unneeded %{buildroot}%{_libdir}/httpd/modules/libphp%{phpver}.so %{buildroot}%{extension_dir}/*.so %{buildroot}%{_bindir}/php
%endif

%files
%attr(755,root,root) %{_libdir}/httpd/modules/libphp%{phpver}.so

%files common
%dir %{_datadir}/%{name}
%dir %{_libdir}/%{name}
%dir %{extension_dir}

%files bcmath
%{extension_dir}/bcmath.so

%files bz2
%{extension_dir}/bz2.so

%files calendar
%{extension_dir}/calendar.so

%files cli
%{_bindir}/php

%files ctype
%{extension_dir}/ctype.so

%files curl
%{extension_dir}/curl.so

%files devel
%{_bindir}/php-config
%{_bindir}/phpize
%{_includedir}/php
%{_libdir}/%{name}/build

%files dom
%{extension_dir}/dom.so

%files exif
%{extension_dir}/exif.so

%files fileinfo
%{extension_dir}/fileinfo.so

%files gd
%{extension_dir}/gd.so

%files gettext
%{extension_dir}/gettext.so

%files hash
%{extension_dir}/hash.so

%files iconv
%{extension_dir}/iconv.so

%files imap
%{extension_dir}/imap.so

%files intl
%{extension_dir}/intl.so

%files json
%{extension_dir}/json.so

%files mbstring
%{extension_dir}/mbstring.so

%files mysqli
%{extension_dir}/mysqli.so

%files opcache
%{extension_dir}/opcache.so
%{_datarootdir}/%{name}/zendoptimizer.php

%files openssl
%{extension_dir}/openssl.so

%files pcntl
%{extension_dir}/pcntl.so

%files pdo
%{extension_dir}/pdo.so
%{extension_dir}/pdo_mysql.so

%files phar
%{extension_dir}/phar.so

%files posix
%{extension_dir}/posix.so

%files readline
%{extension_dir}/readline.so

%files session
%{extension_dir}/session.so

%files simplexml
%{extension_dir}/simplexml.so

%files soap
%{extension_dir}/soap.so

%files sockets
%{extension_dir}/sockets.so

%files tidy
%{extension_dir}/tidy.so

%files tokenizer
%{extension_dir}/tokenizer.so

%files xmlreader
%{extension_dir}/xmlreader.so

%files xmlwriter
%{extension_dir}/xmlwriter.so

%files zip
%{extension_dir}/zip.so

%changelog
* Tue Mar 14 2017 Reindl Harald <h.reindl@thelounge.net>
- update to PHP 7.0.17
 [2017-04-30 19:10 UTC] bukka@php.net
-Status: Assigned +Status: Not a bug
 [2017-04-30 19:10 UTC] bukka@php.net
Sorry for the late reply (forgot about this one...). Ah I see what you mean. That's not supported (openssl as shared extension). I will close this one as it's not a bug and and the comments are a bit confusing.

I think it will be best to open a new feature request as I have already seen a similar request and already closed it as not a bug. So it probably makes sense to have a feature / change request for it as it might be useful for some users. Please open it and clarify that you want to be able to compile openssl ext as a shared extension.

Thanks
 [2017-04-30 19:44 UTC] spam2 at rhsoft dot net
What do you try to tell me with "it's not supported" obviously it is besides the test suite since we are running builds with openssl.so as shared extension for many months in production with php 7.0 and 7.1
 [2017-04-30 19:58 UTC] bukka@php.net
-Status: Not a bug +Status: Re-Opened -Package: Dynamic loading +Package: OpenSSL related
 [2017-04-30 19:58 UTC] bukka@php.net
Actually you are right, the build system supports that so it should be probably a bug. Re-opening.
 [2017-10-24 05:45 UTC] kalle@php.net
-Status: Re-Opened +Status: Assigned
 [2019-05-27 16:01 UTC] bukka@php.net
-Status: Assigned +Status: Re-Opened -Assigned To: bukka +Assigned To:
 [2019-05-27 16:01 UTC] bukka@php.net
I don't think I will ever have time for this so removing myself from assigned...
 [2021-06-23 19:59 UTC] kasaw60462 at bbsaili dot com
@bukka After 2 years (not counting the submitted date) did you find time to solve this recurring and anoying issue?
 [2023-05-01 06:56 UTC] tourismqueens at gmail dot com
Mrs India is Trademark of Mrs India Pageants and Productions Pvt Ltd directed by former Mrs Asia International Deepali Phadnis . 11 Years of making Queens. More info to visit our website: (https://mrsindia.net)github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 16:01:33 2024 UTC