Doc #81540 [Opn]: Variables become null in if statements

From: Date: Tue, 19 Oct 2021 08:35:00 +0000
Subject: Doc #81540 [Opn]: Variables become null in if statements
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19274@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81540&edit=1 ID: 81540 Updated by: nikic@php.net Reported by: fred5 at originsystems dot co dot za -Summary: OpenSSL 3.0.0 is not supported prior to 8.1.0 +Summary: Variables become null in if statements Status: Open Type: Documentation Problem Package: Compile Failure -Operating System: CentOS 7.9 +Operating System: Linux -PHP Version: 8.0.11 +PHP Version: 7.4.16 Block user comment: N Private report: N New Comment: Right. Full compatibility with OpenSSL 3.0 took a large amount of effort that I'm not willing to backport. You'll have to upgrade if you want to use OpenSSL 3.0. Previous Comments: ------------------------------------------------------------------------ [2021-10-19 08:25:16] cmb@php.net To my knowlege, OpenSSL 3 is only supported as of PHP 8.1.0; sticking with OpenSSL 1.1.1 for older PHP branches should be fine. ------------------------------------------------------------------------ [2021-10-19 05:19:34] fred5 at originsystems dot co dot za Description: ------------ Many errors related to openssl 3.0.0 begin appearing midway through the PHP build. The build failed. A build with openssl 1.1.1l completes successfully. Below, I have listed the first errors / warnings that appeared below. Generally, php.net recommends we upgrade to the latest openssl and I would thus like to know whether openssl 3.0.0 (the latest version) is currently supported by PHP or whether we should stick with 1.1.1l thanks ---------------------------------------------------------------------------- In file included from /SystemsDevelopment/temp/osWEB/source/php-8.0.11/main/php.h:439:0, from /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:27: /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c: In function \u2018zm_startup_openssl\u2019: /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:1224:51: error: \u2018RSA_SSLV23_PADDING\u2019 undeclared (first use in this function) REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/Zend/zend_constants.h:50:105: note: in definition of macro \u2018REGISTER_LONG_CONSTANT\u2019 #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:1224:51: note: each undeclared identifier is reported only once for each function it appears in REGISTER_LONG_CONSTANT("OPENSSL_SSLV23_PADDING", RSA_SSLV23_PADDING, CONST_CS|CONST_PERSISTENT); ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/Zend/zend_constants.h:50:105: note: in definition of macro \u2018REGISTER_LONG_CONSTANT\u2019 #define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number) ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c: In function \u2018php_openssl_generate_private_key\u2019: /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:3690:7: warning: \u2018RSA_new\u2019 is deprecated (declared at /SystemsDevelopment/temp/osWEB/build/openssl-3.0.0/include/openssl/rsa.h:201): Since OpenSSL 3.0 [-Wdeprecated-declarations] rsaparam = RSA_new(); ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:3692:7: warning: \u2018RSA_generate_key_ex\u2019 is deprecated (declared at /SystemsDevelopment/temp/osWEB/build/openssl-3.0.0/include/openssl/rsa.h:260): Since OpenSSL 3.0 [-Wdeprecated-declarations] if (rsaparam == NULL || !RSA_generate_key_ex(rsaparam, req->priv_key_bits, bne, NULL)) { ^ /SystemsDevelopment/temp/osWEB/source/php-8.0.11/ext/openssl/openssl.c:3694:8: warning: \u2018RSA_free\u2019 is deprecated (declared at /SystemsDevelopment/temp/osWEB/build/openssl-3.0.0/include/openssl/rsa.h:293): Since OpenSSL 3.0 [-Wdeprecated-declarations] ---------------------------------------------------------------------------- ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81540&edit=1

« previous php.doc.bugs (#19274) next »