How to install php-mcrypt in lando with php 7.2?

半世苍凉 提交于 2019-12-11 18:48:17

问题


Following example in How to install mcrypt on Docker I came to this:

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"

After rebuilding I see:

$ lando php -m | grep mcrypt
mcrypt

But in my web application when I look at the page with phpinfo(), then there is no trace of mcrypt. Please help me out to install php-mcrypt correctly.


回答1:


This is what you've missed:

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

You can use the following:

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


来源:https://stackoverflow.com/questions/54752814/how-to-install-php-mcrypt-in-lando-with-php-7-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!