duandi5328 2019-02-13 16:53
浏览 3965
已采纳

Composer更新:请求的PHP扩展名ext-http丢失

I am creating a php website using the symfony framework and composer.

  • Operating system: Windows 10
  • PHP version: 7.3.2
  • Symfony: 4.2.3 (env: dev, debug: true)
  • Composer: 1.8.4 (2019-02-11)

When I try to do compose update inside the projects folder or when I try to install a bundle using composer require symfony/swiftmailer-bundle I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-http * is missing from your system.
      Install or enable PHP's http extension.

(It says 'Problem 1', but it is the only problem listed.)

I already looked for the extension in my php.ini file, but I can't find it. Do I need to install an extension manually? If so, where can I find it?

Thanks in advance!

  • 写回答

5条回答 默认 最新

  • doucong1268 2019-02-14 09:22
    关注

    The solution is found. For some reason my composer.json contained "ext-http": "*".

    "require": {
        "ext-http": "*"
    }
    

    Removing this line fixed the problem. I don't know why it contained "ext-http": "*" and I don't fully understand why removing it would fix the problem. (Is it because it is looking for the extension, but can not find it?)

    (Thank you to everyone trying to help me fix the problem!)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?