Compiling PHP 7.4 with support for non-native OpenSSL
| From: | Pete Cooper | Date: | Tue, 12 Nov 2019 17:40:35 +0000 |
| Subject: | Compiling PHP 7.4 with support for non-native OpenSSL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-326941@lists.php.net to get a copy of this message | ||
Hello.
I run an Ubuntu server with PHP 7.2.24, PHP 7.3.11 and PHP 7.4.0RC6, primarily alongside Nginx via
PHP-FPM. I compile PHP from source, and I bake in the latest OpenSSL (1.1.1d at the time of writing)
among other things.
For PHP 7.2 and 7.3, I can achieve this. For PHP 7.4, I cannot. I think I must be doing something
wrong, because PHP reverts (?) to the system-native OpenSSL (1.1.1 at the time of writing). There
were no errors thrown during the compile on any of the three versions.
I would be most grateful for additional eyes / brains, and any pointers for further reading or areas
to investigate as I have run out of ideas. I have full root access to everything and I’ve just
built a test server from scratch to make sure I’m not seeing things.
Thank you in advance for any advice or feedback.
Pete
== Compile (configure) flags ==
= PHP 7.2 =
./configure \
--enable-bcmath \
--enable-cli \
--enable-dom \
--enable-exif \
--enable-fpm \
--enable-intl \
--enable-json \
--enable-libxml \
--enable-mbstring \
--enable-opcache \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--enable-xml \
--enable-zip \
--prefix=/etc/php/7.2/ \
--with-config-file-path=/etc/php/7.2/etc/ \
--with-curl \
--with-fpm-group=www-data \
--with-fpm-user=www-data \
--with-freetype-dir=/usr/lib/x86_64-linux-gnu/ \
--with-gd \
--with-jpeg-dir \
--with-mysqli \
--with-openssl=/etc/php/shared/openssl/ \
--with-pdo-mysql \
--with-pear \
--with-png-dir \
--with-sodium \
--with-webp-dir \
--with-xsl \
--with-zlib=/etc/php/shared/zlib/
= PHP 7.3 =
./configure \
--enable-bcmath \
--enable-cli \
--enable-dom \
--enable-exif \
--enable-fpm \
--enable-intl \
--enable-json \
--enable-libxml \
--enable-mbstring \
--enable-opcache \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--enable-xml \
--enable-zip \
--prefix=/etc/php/7.3/ \
--with-config-file-path=/etc/php/7.3/etc \
--with-curl \
--with-fpm-group=www-data \
--with-fpm-user=www-data \
--with-freetype-dir=/usr/lib/x86_64-linux-gnu \
--with-gd \
--with-jpeg-dir \
--with-mysqli \
--with-openssl=/etc/php/shared/openssl \
--with-pdo-mysql \
--with-pear \
--with-png-dir \
--with-sodium \
--with-webp-dir \
--with-xsl \
--with-zlib=/etc/php/shared/zlib
= PHP 7.4 =
./configure \
--enable-bcmath \
--enable-cli \
--enable-dom \
--enable-exif \
--enable-fpm \
--enable-gd \
--enable-intl \
--enable-json \
--enable-mbstring \
--enable-opcache \
--enable-simplexml \
--enable-soap \
--enable-sockets \
--prefix=/etc/php/7.4/ \
--with-config-file-path=/etc/php/7.4/etc \
--with-curl \
--with-fpm-group=www-data \
--with-fpm-user=www-data \
--with-freetype \
--with-jpeg \
--with-libxml \
--with-mysqli \
--with-openssl=/etc/php/shared/openssl \
--with-pdo-mysql \
--with-pear \
--with-sodium \
--with-webp \
--with-xsl \
--with-zip \
--with-zlib=/etc/php/shared/zlib
== Headline details from
php -I ==
= PHP 7.2 =
phpinfo()
PHP Version => 7.2.24
System => Linux darwin 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64
Build Date => Nov 12 2019 16:18:32
Configure Command => './configure' '--enable-bcmath'
'--enable-cli' '--enable-dom' '--enable-exif' '--enable-fpm'
'--enable-intl' '--enable-json' '--enable-libxml'
'--enable-mbstring' '--enable-opcache' '--enable-simplexml'
'--enable-soap' '--enable-sockets' '--enable-xml'
'--enable-zip' '--prefix=/etc/php/7.2/'
'--with-config-file-path=/etc/php/7.2/etc/' '--with-curl'
'--with-fpm-group=www-data' '--with-fpm-user=www-data'
'--with-freetype-dir=/usr/lib/x86_64-linux-gnu/' '--with-gd'
'--with-jpeg-dir' '--with-mysqli'
'--with-openssl=/etc/php/shared/openssl/' '--with-pdo-mysql'
'--with-pear' '--with-png-dir' '--with-sodium'
'--with-webp-dir' '--with-xsl' '--with-zlib=/etc/php/shared/zlib/'
= PHP 7.3 =
phpinfo()
PHP Version => 7.3.11
System => Linux darwin 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64
Build Date => Nov 12 2019 16:43:16
Configure Command => './configure' '--enable-bcmath'
'--enable-cli' '--enable-dom' '--enable-exif' '--enable-fpm'
'--enable-intl' '--enable-json' '--enable-libxml'
'--enable-mbstring' '--enable-opcache' '--enable-simplexml'
'--enable-soap' '--enable-sockets' '--enable-xml'
'--enable-zip' '--prefix=/etc/php/7.3/'
'--with-config-file-path=/etc/php/7.3/etc' '--with-curl'
'--with-fpm-group=www-data' '--with-fpm-user=www-data'
'--with-freetype-dir=/usr/lib/x86_64-linux-gnu' '--with-gd'
'--with-jpeg-dir' '--with-mysqli'
'--with-openssl=/etc/php/shared/openssl' '--with-pdo-mysql'
'--with-pear' '--with-png-dir' '--with-sodium'
'--with-webp-dir' '--with-xsl' '--with-zlib=/etc/php/shared/zlib'
= PHP 7.4 =
phpinfo()
PHP Version => 7.4.0RC6
System => Linux darwin 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64
Build Date => Nov 12 2019 17:09:02
Configure Command => './configure' '--enable-bcmath'
'--enable-cli' '--enable-dom' '--enable-exif' '--enable-fpm'
'--enable-gd' '--enable-intl' '--enable-json'
'--enable-mbstring' '--enable-opcache' '--enable-simplexml'
'--enable-soap' '--enable-sockets' '--prefix=/etc/php/7.4/'
'--with-config-file-path=/etc/php/7.4/etc' '--with-curl'
'--with-fpm-group=www-data' '--with-fpm-user=www-data'
'--with-freetype' '--with-jpeg' '--with-libxml'
'--with-mysqli' '--with-openssl=/etc/php/shared/openssl'
'--with-pdo-mysql' '--with-pear' '--with-sodium'
'--with-webp' '--with-xsl' '--with-zip'
'--with-zlib=/etc/php/shared/zlib'
== OpenSSL details from php -i ==
= PHP 7.2 =
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1d 10 Sep 2019
OpenSSL Header Version => OpenSSL 1.1.1d 10 Sep 2019
Openssl default config => /etc/php/shared/openssl/openssl.cnf
= PHP 7.3 =
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1d 10 Sep 2019
OpenSSL Header Version => OpenSSL 1.1.1d 10 Sep 2019
Openssl default config => /etc/php/shared/openssl/openssl.cnf
= PHP 7.4 =
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.1.1 11 Sep 2018
OpenSSL Header Version => OpenSSL 1.1.1 11 Sep 2018
Openssl default config => /usr/lib/ssl/openssl.cnf
--
Pete Cooper
pete@pragmatika.net
https://pragmatika.net
Please note: my working hours may not be your working hours. Please do not feel obligated to reply
outside of your normal work schedule.