php Xampp 警告:模块“openssl”已在第 0 行加载
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36675348/
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
Xampp Warning: Module 'openssl' already loaded in line 0
提问by Mesogi
I have installed Xampp on windows 7. When I try to run code I get the error
我在 Windows 7 上安装了 Xampp。当我尝试运行代码时出现错误
Warning: Module 'openssl' already loaded in line 0
警告:模块“openssl”已在第 0 行加载
This is the same code I have run on the pc before, all I have done is reinstalled Win 7 and a clean install of XAMPP
这与我之前在 PC 上运行的代码相同,我所做的只是重新安装了 Win 7 并全新安装了 XAMPP
回答by radonthetyrant
You seem to have the line
你似乎有这条线
extension=php_openssl.dll
twice in your php.ini file and/or subfiles.
在 php.ini 文件和/或子文件中两次。
You need to find all relevant php.ini files in your xampp directory and remove or comment out one of the module directives like this:
您需要在 xampp 目录中找到所有相关的 php.ini 文件,然后删除或注释掉模块指令之一,如下所示:
;extension=php_openssl.dll
After a server restart, this should solve it.
服务器重新启动后,这应该可以解决它。
回答by mtmfahath
Open xampp -> PHP -> php.ini
Open the file php.iniin any text editor
Press CTRL+ Fand Search for openssl
Comment the line
extension=php_openssl.dll
by placing a semi-colon at the beginning:;extension=php_openssl.dll
打开 xampp -> PHP -> php.ini
在任何文本编辑器中打开文件php.ini
按CTRL+F并搜索openssl
extension=php_openssl.dll
通过在开头放置分号来注释该行:;extension=php_openssl.dll
Note : If you want to enable it again remove the semicolon
注意:如果要再次启用它,请删除分号
回答by K142173 Pawan Kumar
reinstall the xampp and give new location to the required bar in composor installation.
重新安装 xampp 并在 Composor 安装中为所需的栏提供新位置。
回答by Black
I had the same problem and there were not multiple extension=php_openssl.dll
in my case. The reason was because I had two copies of apache for some reasons, but I only used one.
我有同样的问题,extension=php_openssl.dll
在我的情况下没有多个。原因是因为某些原因我有两份apache,但我只使用了一份。
I deleted the copy and changed the environment variable Path
and OPENSSL_CONF
to point to the correct webserver.
我删除了副本并更改了环境变量Path
并OPENSSL_CONF
指向正确的网络服务器。
After restarting the webserver it worked! Make sure to restart all terminals and CMDs, otherwise the old environment variables are used and the error persists.
重新启动网络服务器后,它工作了!确保重新启动所有终端和 CMD,否则使用旧的环境变量并且错误仍然存在。