Search code examples
phpapacheopenssl

Apache not loading openssl php extension although it's enabled


I just upgraded php from v7.4 to v8.3 on my testing environment that uses Apache as the web server.

I uncommented line extension=openssl and i can check it works when i run phpinfo(); outside of apache web server.

But when I do phpinfo(); via Apache, I see openssl extension is not enabled, although the php.ini file is the same.

Why Apache does successfully load my openssl extension and how to fix it ?


Solution

  • Ok I just figured it out.

    Inside my php.ini the extension config by default looks like this extension=openssl and inside the ext/ folder the name of the extension is this php_openssl.dll

    If I give the complete file name as this extension=php_openssl.dll it now works.

    I previously got the exact same issue with the sqlsrv extension.

    I don't understand the behavior though.