[英]How to enable openSSL in PHP 7.4 with Apache Server 2.4?
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:我会尽量具体:
<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) (我在某处看到了可能是解决方案的 LoadFiles,至少它不适合我)
Which btw I understand little, as there is no php.ini in the Windows folder.顺便说一句,我不太了解,因为 Windows 文件夹中没有 php.ini 。 I understand that the file is got from the path specified below.我了解该文件是从下面指定的路径中获取的。
Unable to find the wrapper "https" with file_get_contents 无法使用 file_get_contents 找到包装器“https”
OpenSSL Support disabled in Apache 2.4/PHP 7.4.4 OpenSSL 支持在 Apache 2.4/PHP 7.4.4 中禁用
PHP OpenSSL extension not working while install Typo3 6.2.2 on window7 PHP OpenSSL 扩展在 window7 上安装 Typo3 6.2.2 时不起作用
How to enable HTTPS stream wrappers 如何启用 HTTPS stream 包装器
Thanks a lot!非常感谢!
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.我碰巧想到检查Apache的错误日志,每个模块都注册了以下错误:无法加载动态库。 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.6\ext" and now it works like a dream!它试图从 /ext 文件夹中获取模块,但它不知道它在哪里,所以我所做的是将 php.ini 文件中的 extension_dir 更改为绝对路径“C:\php-7.4. 6\ext",现在它像梦一样工作!
There is a line in php.ini: php.ini 中有一行:
;extension_dir = "ext"
You just have to uncomment it in addition to uncomment extension=php_openssl.dll
as well.除了取消注释extension=php_openssl.dll
之外,您只需取消注释它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.