Installed Apache 2.4.54 and PHP 5.6.32 from the source.
Here are the configure options used.
Apache:
./configure \
--prefix=${APACHE_PREFIX} \
--enable-module=most \
--enable-rewrite \
--enable-auth-digest \
--enable-ssl \
--with-openssl-dir=${OPENSSL} \
--with-included-apr \
--enable-lib64 \
--with-httpd24 \
--enable-mbstring \
--enable-so \
--with-mpm=worker \
--enable-cgi
And PHP:
./configure \
--prefix=${PHP_PREFIX} \
--with-config-file-path=${PHP_PREFIX}/lib \
--with-tsrm-pthreads \
--disable-short-tags \
--enable-mbstring \
--enable-opcache \
--with-xsl=${LIBXSLT_PREFIX} \
--with-zlib=${ZLIB_PREFIX} \
--with-openssl-dir=${OPENSSL} \
--with-ssl \
--with-gd
The installation is successful.
There is shared object file libphp5.so got created under apache2_installation/modules directory.
When apachectl -M is executed, it says php5_module is loaded.
When apachectl -t is executed, it says Syntax OK`.
However, when ldd -d libphp5.so is executed, it says:
undefined symbol: ap_server_root (./libphp5.so)
undefined symbol: apr_pool_cleanup_null (./libphp5.so)
undefined symbol: ap_unixd_config (./libphp5.so)
undefined symbol: ap_loaded_modules (./libphp5.so)
Thought, I might have missed something. Then tried docker image php:5.6-apache. And still result is same.
When libphp5.so is used as dependency in other sources, I am running into above issue. And unable to proceed.
Just looking for way to overcome the above undefined symbol issues, searched a lot with futile.
Appreciate any help!
EDIT:
Found this link which says to use Apache 2.2 but I had to use with TLS v1.3.