skip to Main Content

I am aware very similar questions have been around but none seem to have the solution for my problem. I wonder if you could give me a hand with this one. I’ll try to be as specific as possible:

  • I’m on a Windows x64
  • PHP version 7.4.6
  • Apache server 2.4.43
  • On the php.ini file I uncommented extension=openssl and extension_dir = “ext”
  • On the httpd.conf file I added this extra snippet
<IfModule php7_module>
  AddHandler application/x-httpd-php .php
  PHPIniDir "C:/php-7.4.6"
  LoadFile "C:/php-7.4.6/libcrypto-1_1-x64.dll"
  LoadFile "C:/php-7.4.6/libssl-1_1-x64.dll"
  LoadFile "C:/php-7.4.6/libssh2.dll"
  LoadFile "C:/php-7.4.6/nghttp2.dll"
  LoadFile "C:/php-7.4.6/php7ts.dll"
</IfModule>

(I include the LoadFiles as I saw somewhere that that might be solution, well it’s not for me at least)

  • Checked on the command line the modules installed (php -m) and it seems that the ssl module is enabled. However when checking with the extension_loaded (‘openssl’) instruction it returns a false. Also, with phpinfo() I see that OpenSSL support is disabled and I should install (ext/openssl).
    I don’t know why they are telling me opposite things. https wrapper is not enabled either.
  • I checked if both php and apache were reading from different php.ini files and they both say the same thing:
    Configuration File (php.ini) Path C:WINDOWS
    Loaded Configuration File C:php-7.4.6php.ini

Which btw I understand little, as there is no php.ini in the Windows folder. I understand that the file is got from the path specified below.

  • In the ext folder there is the php_openssl.dll file.
  • I tried to include C:php-7.4.6libcrypto-1_1-x64.dll as environmental variable as I saw that in a different link.
  • And yes, I restarted the server several times.
    I reckon I ran out of options and I don’t know what else I should do. Thanks for your help!
    I try to attach the links that I’ve been visiting, although I’m sure I’m leaving some behind as I lost track.

Unable to find the wrapper "https" with file_get_contents

OpenSSL Support disabled in Apache 2.4/PHP 7.4.4

PHP OpenSSL extension not working while install Typo3 6.2.2 on window7

How to enable HTTPS stream wrappers

Thanks a lot!

2

Answers


  1. Chosen as BEST ANSWER

    Fortunately I managed to get it to work and I want to share with you all the solution in case you are facing the same problem. I happened to think about checking the error logs of Apache and the following error was registered for every module: Unable to load dynamic library. It was trying to take the module from the /ext folder, which it didn't know where it was, so what I did was to change in the php.ini file the extension_dir to an absolute PATH "C:php-7.4.6ext" and now it works like a dream!


  2. There is a line in php.ini:

    ;extension_dir = "ext"
    

    You just have to uncomment it in addition to uncomment extension=php_openssl.dll as well.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search