From:             rainer dot jung at kippdata dot de
Operating system: Linux x86_64, Solaris 10 Sparc
PHP version:      7.4.0beta1
Package:          Testing related
Bug Type:         Bug
Bug description:OpenSSL tests using workers fail due to missing openssl ext in 
worker process

Description:
------------
Several OpenSSL extension tests fork a new process executing various
server tasks. This new process is created as another PHP process, but
without any explicit ini or extension loading - at least on Linux/Unix.
In our case the OpenSSl extension must be dynamically loaded and there
is not implicit php.ini that PHP would automatically load. Thus the new
server worker fails and as a result the tests fail.

This is true for the following tests (based on 7.0beta1, but mostly the
same holds true for current 7.3 and 7.2):

- ext/openssl/tests/bug65729.phpt
- ext/openssl/tests/bug68265.phpt
- ext/openssl/tests/bug68879.phpt
- ext/openssl/tests/bug68920.phpt
- ext/openssl/tests/bug69215.phpt
- ext/openssl/tests/bug76705.phpt
- ext/openssl/tests/san_peer_matching.phpt
- ext/openssl/tests/sni_server.phpt
- ext/openssl/tests/sni_server_key_cert.phpt
- ext/openssl/tests/streams_crypto_method.phpt
- ext/openssl/tests/tls_min_v1.0_max_v1.1_wrapper.phpt
- ext/openssl/tests/tls_wrapper.phpt
- ext/openssl/tests/tls_wrapper_with_tls_v1.3.phpt
- ext/openssl/tests/tlsv1.0_wrapper.phpt
- ext/openssl/tests/tlsv1.1_wrapper.phpt
- ext/openssl/tests/tlsv1.2_wrapper.phpt
- ext/openssl/tests/tlsv1.3_wrapper.phpt

I don't have a good patch for it. As soon as I add a default php.ini
which loads the openssl extension, everything is fine. I also verified
that the failure is due to the missing openssl extension in the worker
by running tests under strace and watching the server warnings that are
swallowed by the child. As a workaround I used the following patch, but
it should be conditional on whether openssl is a static or shared
extension. I don't know, how Windows behaves.

Index: ext/openssl/tests/ServerClientTestCase.inc
--- ext/openssl/tests/ServerClientTestCase.inc       2019-07-26
02:13:34.988151000 +0000
+++ ext/openssl/tests/ServerClientTestCase.inc       2019-07-28
23:01:28.525371000 +0000
@@ -72,7 +72,7 @@
             );
         } else {
             $cmd = sprintf(
-                '%s "%s" %s %s',
+                '%s -d extension=openssl "%s" %s %s',
                 PHP_BINARY,
                 __FILE__,
                 WORKER_ARGV_VALUE,



-- 
Edit bug report at https://bugs.php.net/bug.php?id=78345&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=78345&r=trysnapshot54
Try a snapshot (PHP 5.5):   
https://bugs.php.net/fix.php?id=78345&r=trysnapshot55
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=78345&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=78345&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=78345&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=78345&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=78345&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=78345&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=78345&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=78345&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=78345&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=78345&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=78345&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78345&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=78345&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=78345&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=78345&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78345&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=78345&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=78345&r=mysqlcfg

Reply via email to