markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.52k stars 995 forks source link

Upgrade to 2.4.7 - Undefined constant FTP_BINARY #1147

Open ClemenF opened 4 months ago

ClemenF commented 4 months ago

Description I am upgrading my Magento EE from 2.4.5 to 2.4.7. I used the image markoshust/magento-php:8.1-fpm and changed it to markoshust/magento-php:8.2-fpm-4.

I got the following Exception when editing a scheduled import from BO : Undefined constant "Magento\ScheduledImportExport\Model\Scheduled\Operation\FTP_BINARY"

It seems to be a constant defined with the extension php-ftp. It was present in my old application settings : (screenshot in PHP fpm docker, result of PHP --m) image

With the new version, the extension isn't present anymore.

Is it normal to don't have it anymore?

Thanks!

Kevin9131 commented 4 months ago

Same issue here on Magento 2.4.6-p3 and 8.2-fpm, 8.2-fpm-4

ClemenF commented 4 months ago

https://github.com/docker-library/php/issues/1488 php remove the ftp extension. Could it be added to the image?

zfaty commented 3 months ago

You need to install the FTP extension to do that you can customize the php markoshust/magento-php:8.2-fpm-1 image .

Add a new Dockerfile that extend from the image path => images/php/Dockerfile

Dockerfile:

FROM markoshust/magento-php:8.2-fpm-1

USER root

RUN apt-get install -y libssl-dev

RUN docker-php-ext-configure ftp --with-openssl-dir=/usr \
    && docker-php-ext-install ftp

USER app

then go the compose.yaml to update the phpfpm service Replace image: markoshust/magento-php:8.2-fpm-1 by your local image => build: images/php so the service will be something like:


  phpfpm:
    build: images/php
    volumes: *appvolumes
    env_file: env/phpfpm.env