I am trying to compile PHP 7.2.5
on a RedHat operation system. I already compiled OpenSSL 1.1.0h
on my own in a directory of my own /home/user/openssl-1.1
. These are the lines how I compiled OpenSSL
TARGET_DIR=/home/usr/openssl-1.1
# ...
./config no-shared --prefix=${TARGET_DIR} --openssldir=${TARGET_DIR}/conf
make INSTALL_PREFIX=${TARGET_DIR}
make install
Now, I want to compile PHP 7.2.5
together with the compiled OpenSSL version. I do it with these lines:
PHP_PREFIX=/home/user/php-7.2
export OPENSSL_INCLUDE_DIR=/home/user/openssl-1.1/include/openssl
# ...
./buildconf --force
./configure --prefix="$PHP_PREFIX" \
--enable-sockets \
--enable-embed \
--enable-com-dotnet \
--enable-ctype \
--with-curl \
--enable-mbstring=static \
--with-gd \
--enable-soap \
--enable-pdo=static \
--with-mp \
--with-curl=static \
--with-openssl=static \
--with-openssl-dir="/home/user/openssl-1.1"
But at some point, I get this error message:
configure: error: Cannot find OpenSSL's <evp.h>
This file evp.h
exists in the directory /home/user/openssl-1.1/include/openssl
.
Does anyone know how to fix this problem?