/usr/local/bin/docker-php-ext-enable: 108: /usr/local/bin/docker-php-ext-enable: cannot create /conf.d/docker-php-ext-mysqli.ini: Directory nonexistent

Since this morning I have been receiving this error:
/usr/local/bin/docker-php-ext-enable: 108: /usr/local/bin/docker-php-ext-enable: cannot create /conf.d/docker-php-ext-mysqli.ini: Directory nonexistent

I have been using my current config.yml for the past three months without any issues.

This is my current config:

jobs:
   build:
     docker:
     - image: circleci/php
     - image: circleci/mysql:5.7
       environment:
       - MYSQL_DATABASE=testing
       - MYSQL_USER=root
       - MYSQL_ROOT_HOST=%
       - MYSQL_HOST=127.0.0.1
   steps:
   - checkout
   - run: sudo docker-php-ext-install mysqli pdo pdo_mysql
   - restore_cache:
      keys:
      - v1-dependencies-{{ checksum "composer.json" }}
      - v1-dependencies-
   - run: composer install --no-interaction --prefer-dist --optimize-autoloader
   - run: php artisan migrate --env=testing --force
   - run: php artisan key:generate --env=testing
   - run: php artisan passport:install --env=testing
   - save_cache:
      paths:
      - ./vendor
    key: v1-dependencies-{{ checksum "composer.json" }}
    - run: vendor/bin/phpunit

   deploy:
      machine:
        enabled: true
        steps:
        - run:
        command: |
            ssh -v $DROPLET_USER@$DROPLET_IP "eval \`ssh-agent\`; ssh-add ~/.ssh/deploy; cd /opt/scripts; ./deploy.sh"

workflows:
  version: 2
  build-and-deploy:
    jobs:
    - build
   - deploy:
      requires:
      - build
      filters:
        branches:
          only: master
1 Like

Hello,
This would suggest something has been updated in the official PHP images. We will investigate and see if there is anything we can implement on our end.

For the time being, what we would recommend is opening the last successfully ran project >> Select the drop down for the “Spin-up” step >> Locate the SHA of the php image used.

It will looks something like circleci/php@sha256:XXXXXXXXXXXXXXXXXXXXXX

A Github issue has been opened: https://github.com/docker-library/php/issues/750

I ran into the same issue, adding the -E flag to the sudo run commands resolved the command steps that failed.

  • run: sudo -E docker-php-ext-install pdo pdo_mysql
  • run: sudo -E docker-php-ext-install bcmath && sudo docker-php-ext-enable bcmath
3 Likes

saved my day !

Saved me hours of debugging. Thanks for finding that.

This did the job!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.