laravel 在 Windows 上的 Apache/PHP 中禁用 OpenSSL 支持
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41707783/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
OpenSSL support disabled in Apache/PHP on Windows
提问by Maher Bek
openssl is disabled apache2.4 with php7.1
openssl 被禁用 apache2.4 与 php7.1
in phpinfo(); results give me this
在 phpinfo() 中;结果给了我这个
OpenSSL support disabled (install ext/openssl)
禁用 OpenSSL 支持(安装 ext/openssl)
- i changed this in php.ini
- 我在 php.ini 中改变了这个
extension=php_openssl.dll
扩展名=php_openssl.dll
- i use this code using WINDOWS CMD
- 我使用 WINDOWS CMD 使用此代码
set OPENSSL_CONF=/path/to/openssl.cnf
设置 OPENSSL_CONF=/path/to/openssl.cnf
- its enabled when use in CMD this but its disabled in phpinfo();
- 它在 CMD 中使用时启用,但在 phpinfo() 中禁用;
php --ri openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.2j 26 Sep 2016 Openssl default config => C:/jampp/php71/extras/ssl/openssl.cnf
php --ri openssl OpenSSL 支持 => 启用 OpenSSL 库版本 => OpenSSL 1.0.2j 2016 年 9 月 26 日 Openssl 默认配置 => C:/jampp/php71/extras/ssl/openssl.cnf
its now working in CMD and but phpinfo(); not and in laravel 5 show me this error
它现在在 CMD 和 phpinfo() 中工作;不是,在 Laravel 5 中向我展示这个错误
Call to undefined function openssl_encrypt()
调用未定义的函数 openssl_encrypt()
Thanks
谢谢
回答by Maher Bek
Thank you all its just need includes the (DLLs files of php) into httpd.conf
谢谢大家,它只需要将(php 的 DLL 文件)包含到 httpd.conf 中
LoadFile "C:/jampp/php/libeay32.dll"
LoadFile "C:/jampp/php/ssleay32.dll"
LoadFile "C:/jampp/php/php7ts.dll"
LoadFile "C:/jampp/php/libpq.dll"