0

I'm using the PHP version 7.0.26 on Windows Server 2008R2. I tried to enable the php_openssl.dll extension by following steps in php.ini:

1. uncomment line: extension=php_openssl.dll
2. set path: extension_dir = "D:/_SERVER/_php7/ext/"
3. copy: php.ini to C:\Windows
4. restart server: httpd -k stop, httpd -k start

Now, when I try which extensions are loaded in command prompt through php -m I see, that php_openssl extension is loaded.

But, when I try to check loaded extension in web browser though method get_loaded_extensions(), the extension is not loaded :-(

In error log, there are following lines:

The 'Apache2.4' service is restarting.
The 'Apache2.4' service has restarted.
winnt:notice] [pid 376:tid 456] AH00424: Parent: Received restart signal         -- Restarting the server.
[Thu Nov 30 16:47:14.478831 2017] [ssl:warn] [pid 376:tid 456] AH01873:     Init: Session Cache is not configured [hint: SSLSessionCache]
PHP Warning:  PHP Startup: Unable to load dynamic library 'D:/_SERVER/_php7/ext/php_openssl.dll' - The specified module could not be found.\r\n in    Unknown on line 0
[Thu Nov 30 16:47:14.494431 2017] [mpm_winnt:notice] [pid 376:tid 456] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/7.0.26 configured -- resuming normal operations
[Thu Nov 30 16:47:14.494431 2017] [mpm_winnt:notice] [pid 376:tid 456] AH00456: Apache Lounge VC15 Server built: Jul  7 2017 11:43:51
[Thu Nov 30 16:47:14.494431 2017] [core:notice] [pid 376:tid 456] AH00094: Command line: 'd:\\_SERVER\\_apache\\bin\\httpd.exe -d D:/_SERVER/_apache'
[Thu Nov 30 16:47:14.494431 2017] [mpm_winnt:notice] [pid 376:tid 456] AH00418: Parent: Created child process 6256
[Thu Nov 30 16:47:14.978047 2017] [ssl:warn] [pid 6256:tid 188] AH01873:     Init: Session Cache is not configured [hint: SSLSessionCache]
PHP Warning:  PHP Startup: Unable to load dynamic library 'D:/_SERVER/_php7/ext/php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Thu Nov 30 16:47:15.461662 2017] [mpm_winnt:notice] [pid 6256:tid 188] AH00354: Child: Starting 64 worker threads.
[Thu Nov 30 16:47:17.021712 2017] [mpm_winnt:notice] [pid 3668:tid 188] AH00364: Child: All worker threads have exited.

I'm sure, that path to the php_openssl.dll is correct.

Thanks for each help. Regards.

6
  • "I'm sure, that path to the php_openssl.dll is correct." - well, Apache disagrees. Commented Nov 30, 2017 at 16:26
  • Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Web Applications Stack Exchange, Webmaster Stack Exchange or Unix & Linux Stack Exchange would be a better place to ask. Commented Nov 30, 2017 at 16:32
  • @jww Thanks, I accept it. Commented Dec 1, 2017 at 7:41
  • @Gordon Yes, its truth. The Apache disagrees. But I'm sure, that the path is correct. But In command prompt the openssh is working! And in browser not. Longer time before, I had the same problem and I solved it. but I don´t remember, how :-D Commented Dec 1, 2017 at 7:43
  • Hello, steelbull is not the only person who comes across this problem. I have the same problem too. I think there is something wrong will the DLL. Only several dlls are not loading. for me, php_curl.dll and openssl are not loading Commented Aug 19, 2018 at 13:48

2 Answers 2

2

\php.ini

; Directory in which the loadable extensions (modules) reside.
; On windows:

extension_dir = "ext"
Sign up to request clarification or add additional context in comments.

4 Comments

Yes, I set the extension dir. Im sure, that extension dir and path to extension dll is correct.
You should runphpinfo(); to discover which php.ini file is actually being used by Apache and that it has both the extension folder set correctly and the extension enabled.
I checked the path to php.ini and it was correct. This is second time, when I has the same problem. When I was run php -r print_r(get_loaded_extensions()), there was an another result, like when I put the same php code to test.php. In php command, the extension was loaded and from php file not :-(
Also, I was sure, that the php.ini path was correct, because when I uncomment the line extension=...., in PHP log, I found the failure message and when I comment that extension line, the error message disappeared.
0

I removed PHP and Apache, download latest versions, configure and now it works. But I do not found right reason of this failure :-(

Thanks for each help.

1 Comment

Apparently it is probably because their are other dependent DLLs which must befound, as well. So in that case Apache isn't displaying very helpful info in its log. stackoverflow.com/a/38417096/5039027 Otherwise it was probably a permission issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.