【发布时间】:2017-11-30 15:50:18
【问题描述】:
我在 Windows Server 2008R2 上使用 PHP 版本 7.0.26。我尝试按照 php.ini 中的步骤启用 php_openssl.dll 扩展:
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
现在,当我尝试通过 php -m 在命令提示符中加载哪些扩展时,我看到,php_openssl 扩展已加载。
但是,当我尝试通过 get_loaded_extensions() 方法检查 Web 浏览器中加载的扩展时,未加载扩展:-(
在错误日志中,有以下几行:
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.
我确定,php_openssl.dll 的路径是正确的。
感谢您的每一个帮助。 问候。
【问题讨论】:
-
“我确定,php_openssl.dll 的路径是正确的。” - Apache 不同意。
-
Stack Overflow 是一个编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参阅帮助中心的What topics can I ask about here。也许Web Applications Stack Exchange、Webmaster Stack Exchange 或Unix & Linux Stack Exchange 会是一个更好的提问地点。
-
@jww 谢谢,我接受了。
-
@Gordon 是的,这是事实。阿帕奇不同意。但我敢肯定,这条路是正确的。但是在命令提示符下,openssh 正在工作!而在浏览器中没有。很久以前,我有同样的问题,我解决了。但我不记得,如何:-D
-
您好,steelbull 并不是唯一遇到此问题的人。我也有同样的问题。我认为DLL有问题。只有几个 dll 没有加载。对我来说,php_curl.dll 和 openssl 没有加载
标签: php apache openssl php-extension