Loading

php windows安装phpstudy,php8+执行php脚本报错:Warning: PHP Startup: Unable to load dynamic library 'openssl'

在 PHP 8.x 的 NTS(非线程安全) 版本里,扩展文件没有添加默认的加载路径:

1. 确认文件存在

打开 D:\phpstudy_pro\Extensions\php\php8.2.9nts\ext 目录下必须有 openssl.dll 如果没有,说明 phpstudy 的 PHP 8.2.9 包不完整,直接在https://windows.php.net/downloads/releases/https://windows.php.net/downloads/releases/下载同版本 zip,把 ext\php_openssl.dll 或 ext\openssl.dll 拷进来即可。

2. 在php.ini的配置文件中添加php的扩展文件相关的目录:

D:\phpstudy_pro\Extensions\php\php8.2.9nts\ext

3. 重启服务即可。

posted @ 2025-09-30 19:32  Carvers  阅读(39)  评论(0)    收藏  举报