安装Composer OpenSSL问题

 最陌生的挣扎2502893263 发布于 2022-12-28 19:09

嗨伙计们我想安装composer但是当我去安装它时我得到这个错误:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl

我目前有php 5.4.31,我正在运行WAMP2.2我已经检查了我的php.ini文件,bin/php/php5.4.31/并确保取消注释以下行:

extension=php_openssl.dll

错误仍然解决,我不知道如何解决它.正如我想的那样,通过取消注释它将被启用.

此外,当我在终端窗口中运行此命令时,php --ini我收到以下消息:

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\php_openssl.dll' - The specified module could not be found

2 个回答
  • @Javacadabra,像php_openssl.dll这样的扩展将在php/ext /目录下,您可以在配置文件中修复此路径,或者您可以将该特定文件从php/ext目录复制到php目录.

    在你的情况下,它将是c:\ php\ext

    2022-12-28 19:12 回答
  • 请务必取消推荐此行:

     extension_dir = "ext"
    

    它确保php从其自己的ext库中获取扩展名

    2022-12-28 19:12 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有