如何在XAMPP中启用openssl支持?

时间:2012-12-17 20:13:18

标签: openssl xampp

我正在尝试在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. 

这个错误意味着什么,我做错了什么?

1 个答案:

答案 0 :(得分:4)

要在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,然后使用记事本或wordpad打开php.ini文件

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

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