【问题标题】:How to enable openssl support in XAMPP?如何在 XAMPP 中启用 openssl 支持?
【发布时间】:2012-12-04 23:30:44
【问题描述】:

我正在尝试在 XAMPP 中启用 openssl 支持。我按照这些说明进行操作,但出现错误:

1.  Open php.ini and  uncomment the following:  extension=php_openssl.dll

2.  Make sure you have config the following section pointing to your 
php install directory (in my case is located in a second partition at 
e:\php)

3.  Directory in which the loadable extensions (modules) reside.
extension_dir = "e:/php/ext"

4.  Add your php directory to the PATH variable
start>run>type cmd
on windows console type:
set PATH=%PATH%;e:\php
(remember replace e:\php with YOUR directory)
(note that using %path% is the same as var+=value, so the directory 
will be appended at the end of the variable)

5.  php5 comes with all the dll in the zip package so if you add the php 
directory to the path variable, you don't need to move anything to your 
windows system directory (very safe for later updates, because you just 
replace the content of your php directory)

6.  start>run>inetsrv/iis.msc
right click on your computer
all task>restart IIS

当我查看 phpinfo() 时,它说 openssl 支持已启用。

但是当我尝试运行命令行时出现错误:

openssl.cnf not found. 

这个错误是什么意思,我做错了什么?

【问题讨论】:

    标签: openssl xampp


    【解决方案1】:

    要在您的 xampp 服务器上启用 openssl、curl 和 intl,请按照以下步骤操作:

    注意:以上步骤都可以,但如果您是代码编辑新手,您将一事无成

    1. 打开您的 xampp 服务器的安装位置,例如 C:\xampp or C:\program files\xampp,具体取决于您的安装位置

    2. 在安装 xampp 服务器的文件夹中搜索搜索栏

    3. 输入 C:\xampp\php\php.iniC:\program files\xampp\php\php.ini ,然后使用记事本或写字板打开 php.ini 文件

    4. 然后滚动直到看到 ;extension=openssl.dll, ;extension=curl.dll, ;extension=intl.dll,然后删除注释 (;) 并保存文件

    5. 通过退出并重新启动服务器来关闭您的服务器

    【讨论】:

    • 试过了,但对我不起作用,仍然从作曲家那里得到:SSL/TLS 保护需要 openssl 扩展,但不可用。如果您无法启用 openssl 扩展,您可以通过将“disable-tls”选项设置为 true 来禁用此错误,风险自负。
    猜你喜欢
    • 2012-03-16
    • 1970-01-01
    • 2013-03-20
    • 2011-05-22
    • 2012-01-07
    • 2016-11-15
    • 2017-03-12
    相关资源
    最近更新 更多