扩展无法启用或安装的问题

时间:2019-06-05 19:06:55

标签: php http module

php 7.3.5您好,我的扩展名为ext-http,但作曲家说我ext-http丢失了,即使我在composer .json中编写了它,为什么? 这个确切的消息:  _问题1     -您的系统缺少所要求的PHP扩展名ext-http *。安装或启用PHP的http扩展。我试图查看php.ini,但我发现没什么相关

{
  "type": "project",
  "license": "proprietary",
  "require": {
    "php": "^7.1.3",
    "ext-ctype": "*",
    "ext-iconv": "*",
    "psr/log": "^1.1",
    "ext-intl" : "*",
    "ext-http": "*",
    "sensio/framework-extra-bundle": "^5.2",
    "sensiolabs/security-checker": "^5.0",
    "swiftmailer/swiftmailer": "^6.0",
    "symfony/asset": "4.2.*",
    "symfony/console": "4.2.*",
    "symfony/debug": "4.2.*",
    "symfony/debug-pack": "^1.0",
    "symfony/dependency-injection": "4.2.*",
    "symfony/dotenv": "4.2.*",
    "symfony/expression-language": "4.2.*",
    "symfony/flex": "^1.1",
    "symfony/form": "4.2.*",
    "symfony/framework-bundle": "4.2.*",
    "symfony/monolog-bundle": "^3.1",
    "symfony/orm-pack": "*",
    "symfony/process": "4.2.*",
    "symfony/security-bundle": "4.2.*",
    "symfony/serializer-pack": "*",
    "symfony/swiftmailer-bundle": "^3.1",
    "symfony/translation": "4.2.*",
    "symfony/twig-bundle": "4.2.*",
    "symfony/validator": "4.2.*",
    "symfony/web-link": "4.2.*",
    "symfony/webpack-encore-bundle": "^1.2",
    "symfony/yaml": "4.2.*"
  },
  "require-dev": {
    "doctrine/doctrine-fixtures-bundle": "^3.1",
    "symfony/maker-bundle": "^1.0",
    "symfony/profiler-pack": "*",
    "symfony/test-pack": "*",
    "symfony/web-server-bundle": "4.2.*"
  },
  "config": {
    "preferred-install": {
      "*": "dist"
    },
    "sort-packages": true
  },
  "autoload": {
    "psr-4": {
      "App\\": "src/"
    }
  },
  "autoload-dev": {
    "psr-4": {
      "App\\Tests\\": "tests/"
    }
  },
  "replace": {
    "paragonie/random_compat": "2.*",
    "symfony/polyfill-ctype": "*",
    "symfony/polyfill-iconv": "*",
    "symfony/polyfill-php71": "*",
    "symfony/polyfill-php70": "*",
    "symfony/polyfill-php56": "*"
  },
  "scripts": {
    "auto-scripts": {
      "cache:clear": "symfony-cmd",
      "assets:install %PUBLIC_DIR%": "symfony-cmd",
      "security-checker security:check": "script"
    },
    "post-install-cmd": [
      "@auto-scripts"
    ],
    "post-update-cmd": [
      "@auto-scripts"
    ]
  },
  "conflict": {
    "symfony/symfony": "*"
  },
  "extra": {
    "symfony": {
      "allow-contrib": false,
      "require": "4.2.*"
    }
  }
}

3 个答案:

答案 0 :(得分:1)

看看这个解决方案:https://stackoverflow.com/a/54686959/11505413

在composer.json中删除此行:

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

做一个:

composer install

然后:

composer update

答案 1 :(得分:1)

只需删除<;(如果在行的开头),即可在 php.ini 文件中启用此功能。那应该是这样的: enter image description here

您可以通过以下方式在XAMPP上找到它: enter image description here

答案 2 :(得分:1)

在 bash linux 上输入:php -v result

全部听完/etc/php/<version>/mods-available 在文件 ctype.ini 或其他无法识别的扩展名中:将 extension=name.so

like :