首页 > 解决方案 > 警告:PHP 启动:无法加载动态库“openssl”

问题描述

我在我的 Windows 10 机器上安装了 xampp。从命令提示符运行 php 会出现如下错误。

Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: D:\xamp\php\ext\openssl 
(The specified module could not be found.), D:\xamp\php\ext\php_openssl.dll 
(The specified module could not be found.)) in Unknown on line 0

在 extension_dir 的 php.ini 中,我尝试提供绝对路径以及扩展目录的相对路径。文件位于位置 D:\xamp\php\ext\php_openssl.dll。它仍然给出错误。

标签: phpwindowsxampp

解决方案


你能检查加载的 php.ini 是否正确吗? php --ini 您也可以使用 php -m 检查 cmd 中加载的扩展名 php -m | findstr "xml"

您也可以尝试手动下载 openssl 扩展: http ://www.dlldownloader.com/php_openssl-dll/


推荐阅读