0

I am using the official php8 docker image and install my composer dependencies with

- composer install

My composer file requires :

    "ext-json": "*",
    "ext-mysqli": "*",
    "ext-curl": "*",
    "ext-zip": "*",
    "ext-simplexml": "*",

I have tried the apt way of installing the extensions:

            - apt-get update && apt-get install -y php8.0-mysql            
            - docker-php-ext-enable ext-mysql

I recieve the following errors:

Problem 1 - Root composer.json requires PHP extension ext-mysqli * but it is missing from your system. Install or enable PHP's mysqli extension. Problem 2 - Root composer.json requires PHP extension ext-zip * but it is missing from your system. Install or enable PHP's zip extension.

To enable extensions, verify that they are enabled in your .ini files: - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini. Alternatively, you can run Composer with --ignore-platform-req=ext-mysqli --ignore-platform-req=ext-zip --ignore-platform-req=ext-gd to temporarily ignore these required extensions.

Can someone suggest a way to install these extensions as the official way does not seem to work for me.

Daniel Baker
  • 75
  • 2
  • 9
  • 1
    https://stackoverflow.com/a/37527960/3536236 ? – Martin Oct 24 '22 at 14:04
  • 1
    The https://stackoverflow.com/a/37527960/3536236 from Martin helped a lot. The simplest way to install the mysqli extension was with : `- docker-php-ext-install -j$(nproc) mysqli` – Daniel Baker Oct 25 '22 at 12:11

0 Answers0