R
R
Roman2020-10-05 18:02:40
PHP
Roman, 2020-10-05 18:02:40

When building PHP from source, third-party Openssl does not pull up, how to fix it?

Server on Debian GNU/Linux 8.11 (jessie)
The software package is preinstalled by default, namely PHP 7.3 and OpenSSL 1.0.1t

There was a need to install PHP 7.4.11 and OpenSSL 1.1.1h in parallel without affecting the main software package. Compile from sources into separate folders. To do this, I first compiled and installed OpenSSL 1.1.1h, into the /usr/local/ssl/ folder, and then PHP. When configuring and rebuilding PHP, options were specified to use third-party OpenSSL 1.1.1h from the /usr/local/ssl/ folder, but as a result, PHP still uses OpenSSL 1.0.1t that comes with the preinstalled software. How to fix the situation?

When installing PHP from source, the following commands are used (in particular, the --with-openssl=/usr/local/ssl option):

make clean

CONFIGURE_STRING="--prefix=/usr/local/php7.4.11
--enable-fpm
--enable-mysqlnd
--enable-mbstring
--enable-pdo
--enable-phar
--with-openssl=/usr/local/ssl
--with-config-file-path=/usr/local/php7.4.11
--with-config-file-scan-dir=/usr/local/php7.4.11/etc/conf.d
--with-curl
--with-phar
--with-gd
--with-fpm-user=www-data
--with-fpm-group=www-data
--with-mysql-sock=/var/run/mysqld/mysqld.sock
--with-mysqli=mysqlnd
--with-zlib
--without-sqlite3
--without-pdo-sqlite"

./configure $CONFIGURE_STRING && make && make install


Checking the version of OpenSSL used in PHP: Result output:
/usr/local/php7.4.11/bin/php -i | grep -i openssl


Configure Command =>  './configure'  '--prefix=/usr/local/php7.4.11' '--enable-fpm' '--enable-mysqlnd' '--enable-mbstring' '--enable-pdo' '--enable-phar' '--with-openssl=/usr/local/ssl' '--with-config-file-path=/usr/local/php7.4.11' '--with-config-file-scan-dir=/usr/local/php7.4.11/etc/conf.d' '--with-curl' '--with-phar' '--with-gd' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--with-mysqli=mysqlnd' '--with-zlib' '--without-sqlite3' '--without-pdo-sqlite'
SSL Version => OpenSSL/1.0.1t
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1t  3 May 2016
OpenSSL Header Version => OpenSSL 1.0.1t  3 May 2016
Openssl default config => /usr/lib/ssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
OpenSSL support => enabled


What to do, how to fix the situation? Spent a whole day trying to figure it out...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question