在 Windows 上的 Apache/PHP 中禁用 OpenSSL 支持 [英] OpenSSL support disabled in Apache/PHP on Windows

查看:92
本文介绍了在 Windows 上的 Apache/PHP 中禁用 OpenSSL 支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

openssl 在 apache2.4 和 php7.1 中被禁用

在 phpinfo();结果给了我这个

<块引用>

禁用 OpenSSL 支持(安装 ext/openssl)

  1. 我在 php.ini 中更改了这一点

<块引用>

extension=php_openssl.dll

  1. 我使用 WINDOWS CMD 使用此代码

<块引用>

设置 OPENSSL_CONF=/path/to/openssl.cnf

  1. 它在 CMD 中使用时启用,但在 phpinfo() 中禁用;

<块引用>

php --ri opensslOpenSSL 支持 => 已启用OpenSSL 库版本 => OpenSSL 1.0.2j 2016 年 9 月 26 日Openssl 默认配置 => C:/jampp/php71/extras/ssl/openssl.cnf

它现在在 CMD 中工作,但是 phpinfo();不是,在 Laravel 5 中向我展示这个错误

<块引用>

调用未定义的函数 openssl_encrypt()

谢谢

解决方案

谢谢大家,它只需要将(php 的 DLL 文件)包含到 httpd.conf 中

LoadFile "C:/jampp/php/libeay32.dll"加载文件C:/jampp/php/ssleay32.dll"加载文件C:/jampp/php/php7ts.dll"加载文件C:/jampp/php/libpq.dll"

openssl is disabled apache2.4 with php7.1

in phpinfo(); results give me this

OpenSSL support disabled (install ext/openssl)

  1. i changed this in php.ini

extension=php_openssl.dll

  1. i use this code using WINDOWS CMD

set OPENSSL_CONF=/path/to/openssl.cnf

  1. its enabled when use in CMD this but its disabled in 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

its now working in CMD and but phpinfo(); not and in laravel 5 show me this error

Call to undefined function openssl_encrypt()

Thanks

解决方案

Thank you all its just need includes the (DLLs files of php) into 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"

这篇关于在 Windows 上的 Apache/PHP 中禁用 OpenSSL 支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆