如何使用PHP 7.2在Lando中安装PHP-McRypt



以下示例在如何在Docker上安装MCRYPT我来了:

name: myapp
  recipe: drupal7
  config:
    webroot: web
    php: '7.2'
proxy:
  pma:
    - pma.myapp.lndo.site
services:
  pma:
    type: phpmyadmin
appserver:
  extras:
    - "apt-get update -y"
    - "apt-get install libmcrypt-dev"
    - "pecl install mcrypt-1.0.1"
    - "docker-php-ext-enable mcrypt"

重建后,我看到:

$ lando php -m | grep mcrypt
mcrypt

但是在我的Web应用程序中,当我使用phpinfo()查看页面时,没有Mcrypt的痕迹。请帮助我正确安装PHP-MCRYPT。

这就是您错过的:

services:
  appserver:
    build_as_root:
      - apt-get update -y
      - apt-get install libmcrypt-dev
      - pecl install mcrypt-1.0.1
      - docker-php-ext-enable mcrypt

您可以使用以下内容:

name: myapp
  recipe: drupal7
  config:
    webroot: web
    php: '7.2'
proxy:
  pma:
    - pma.myapp.lndo.site
services:
  pma:
    type: phpmyadmin
  appserver:
    build_as_root:
      - apt-get update -y
      - apt-get install libmcrypt-dev
      - pecl install mcrypt-1.0.1
      - docker-php-ext-enable mcrypt

使其与:

services:
  appserver:
    build_as_root:
      - apt-get update -y
      - apt-get install -y libmcrypt-dev
      - pecl install mcrypt
      - docker-php-ext-enable mcrypt

相关内容

  • 没有找到相关文章

最新更新