Compiling PHP 7.3 with latest OpenSSL

From: Date: Tue, 18 Jun 2019 16:29:42 +0000
Subject: Compiling PHP 7.3 with latest OpenSSL
Groups: php.general 
Request: Send a blank email to php-general+get-326827@lists.php.net to get a copy of this message
Hello. I'm compiling the current PHP 7.3 release from source, and I would like to compile with the latest OpenSSL instead of the system-native OpenSSL. My understanding is the --with-openssl and --with-openssl-dir flags are the way forward. When I use both and provide relative directory to OpenSSL source, the PHP compile completes without error, but a subsequent phpinfo() check shows the (older) system-native library used instead. My questions: * Is it possible to compile PHP 7.3 with OpenSSL source? * If not, do I need to compile a portable OpenSSL first, then compile PHP with references to said OpenSSL? * Does using --with-openssl and --with-openssl-dir together force the system-native version to be used because --with-openssl appears before --with-openssl-dir? Thank you in advance for any feedback and advice. ==8<== Compile script (trimmed for brevity): opensslsourceversion="1_1_1c" \ && php73sourceversion="7.3.6" \ && zlibsourceversion="1.2.11" \ [obtain source archives, extract archives] && cd ~/php7.3-source/php-src-php-$php73sourceversion/ \ && ./buildconf --force \ && ./configure \ --enable-bcmath \ [various enable flags in alphabetical order] --enable-zip \ --prefix=/etc/php/7.3/ \ --with-config-file-path=/etc/php/7.3/etc/ \ [various with-* flags in alphabetical order] --with-mysqli \ --with-openssl \ --with-openssl-dir=../../openssl-source/openssl-OpenSSL_$opensslsourceversion \ --with-pdo-mysql \ [various with-* flags in alphabetical order] --with-zlib \ --with-zlib-dir=../../zlib-source/zlib-$zlibsourceversion \ && make clean \ && make -j$(cat /proc/cpuinfo | grep processor | wc -l) \ && sudo make install ==8<==

« previous php.general (#326827) next »