We have an old PHP application that is used internally within the company. This application has a strict dependency on PHP 5.4 or lower.
Currently, the application is hosted on a virtual machine running Debian 7 Wheezy. However, we are planning to migrate all legacy applications to virtual machines running Ubuntu 22.04 or Debian 12.
I understand that PHP 5.4 cannot be installed from a repository on a modern Ubuntu or Debian systems, so tried to build PHP 5.4 from the sources on Debian 12 machine. But unsuccessfully.
I installed dependencies:
apt install -y build-essential libxml2-dev libssl-dev libcurl4-openssl-dev \
libjpeg-dev libpng-dev libfreetype6-dev libmcrypt-dev libreadline-dev \
libtidy-dev libxslt1-dev libzip-dev libbz2-dev libicu-dev
Tried to run configure to set up the build environment:
./configure --prefix=/usr/local/php5.4 \
--with-config-file-path=/usr/local/php5.4/etc \
--with-mysql --with-mysqli --with-pdo-mysql \
--with-openssl=/usr --with-curl --with-zlib \
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir \
--with-mcrypt --with-readline --with-tidy --with-xsl \
--with-bz2 --with-gettext --with-iconv --with-intl \
--enable-mbstring --enable-zip --enable-soap --enable-sockets \
--enable-bcmath --enable-pcntl --enable-shmop --enable-sysvsem \
--enable-sysvshm --enable-calendar --enable-exif --enable-ftp \
--enable-opcache
And finally go the error:
configure: error: Cannot find OpenSSL's libraries
But package libssl-dev is already installed and configuration option --with-openssl=/usr is used.
Are there any options at all to compile php 5.4 on modern Ubuntu or Debian versions using the openssl library from this distributions?