I'm trying to setup Apache MariaDB PHP manually but I'm running into some issues with the openssl feature. Here are the steps I took to setup Apache 2.4 and PHP 7.4.4:
I. Apache httpd Installation and configuration
- Download and Extract httpd-2.4.43-win64-VS16.zip from apachelounge to "D:\Programs-64Bit\Apache24"
- Set
ServerRoot
in httpd.conf with full path - Set
ServerName
tolocalhost:80
- Define
WWWROOT
with desired DocumentRoot path in httpd.conf (i.e.Define WWWROOT "E:/Programs/WWW"
) - Set
DocumentRoot
and<Directory>
values to"${WWWROOT}"
II. Combining PHP with apache
- Download and Extract Thread Safe php-7.4.4-Win32-vc15-x64.zip to "D:\Programs-64Bit\PHP\PHP7.4.4-64Bit"
- Add the following lines at the end of httpd.conf:
Define PHPROOT "D:/Programs-64Bit/PHP/PHP7.4.4-64Bit" LoadModule php7_module "${PHPROOT}/php7apache2_4.dll" AddType application/x-httpd-php .php PHPIniDir "${PHPROOT}" LoadFile "${PHPROOT}/libcrypto-1_1-x64.dll" LoadFile "${PHPROOT}/libssl-1_1-x64.dll" LoadFile "${PHPROOT}/libssh2.dll" LoadFile "${PHPROOT}/nghttp2.dll" LoadFile "${PHPROOT}/php7ts.dll"
- Copy and rename php.ini-development to the same php root directory as php.ini
- set extension_dir and enable every single extension except oci8_12c, pdo_firebird, pdo_oci and snmp
III. Testing PHP with Apache
- Create a php file (index.php) with the following code:
<?php phpinfo(); ?>
- run httpd.exe
This is what it tells me about openssl:
according to "OpenSSL support disabled in Apache/PHP on Windows" on StackOverflow and the last comment in the php.net page "PHP Manual > Function Reference > Cryptography Extensions > OpenSSL > Installing/Configuring" it should be working. what am I doing wrong?