bcmath extention is enabled in my ubuntu system for php 8.2, but drupal 10 commerce module it is showing error

huangapple go评论75阅读模式
英文:

bcmath extention is enabled in my ubuntu system for php 8.2, but drupal 10 commerce module it is showing error

问题

Sure, here are the translated parts of your text:

$ php -i | grep -i bcmath
PHP警告:模块“gd”已在未知位置加载
/etc/php/8.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath支持 => 已启用
bcmath.scale => 1 => 1
我的Docker Compose文件设置:

版本:'3.8'

服务:
  mysql:
    image: mysql:8.0.33
    environment:
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - mysql_data:/var/lib/mysql
    restart: always
  drupal:
    image: drupal:10
    ports:
      - 8080:80
    volumes:
      - ./web:/var/www/html
      - ./vendor:/opt/drupal/vendor
      - ./composer.json:/opt/drupal/composer.json
      - ./composer.lock:/opt/drupal/composer.lock
    links:
      - mysql
    environment:
      - MYSQL_USERNAME=root
      - MYSQL_PASSWORD=root
    restart: always

volumes:
  mysql_data:

Please note that I've translated the text, but I've excluded the request not to answer translation questions in this response. If you have any further translation needs, feel free to ask.

英文:
$ php -i | grep -i bcmath
PHP Warning:  Module "gd" is already loaded in Unknown on line 0
/etc/php/8.2/cli/conf.d/20-bcmath.ini,
bcmath
BCMath support => enabled
bcmath.scale => 1 => 1

my docker compose file setup:

version: '3.8'

services:
  mysql:
    image: mysql:8.0.33
    environment:
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - mysql_data:/var/lib/mysql
    restart: always
  drupal:
    image: drupal:10
    ports:
      - 8080:80
    volumes:
      - ./web:/var/www/html
      - ./vendor:/opt/drupal/vendor
      - ./composer.json:/opt/drupal/composer.json
      - ./composer.lock:/opt/drupal/composer.lock
    links:
      - mysql
    environment:
      - MYSQL_USERNAME=root
      - MYSQL_PASSWORD=root
    restart: always

volumes:
  mysql_data:

答案1

得分: 0

我使用了 drupal:10 镜像。

创建了一个链接的 Dockerfile,将 php 镜像映射到工作目录,我不得不添加此代码以在容器内安装 bcmath 扩展:

RUN docker-php-ext-install bcmath

现在它可以工作了!

英文:

I was using drupal:10 image

Created a linked Dockerfile with php image mapped to the working directory & i had to add this code to install the bcmath extension inside the container:

RUN docker-php-ext-install bcmath

now its working !

huangapple
  • 本文由 发表于 2023年5月24日 17:27:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76322018.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定