I am struggling to install ftp extension in one of my Laravel project running under Laradock with PHP 8.2.15 on a mac Ventura.
When I run my script on my local server, I get the following error : Call to undefined function ftp_connect().
FTPinfo however indicates that the ftp extension is enabled (Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip).
I can access the site with my FTP client.
I read a lot of info and I came to the conclusion that I have to add the following lines in the Dockerfile located in the laradock/php-fpm folder.
###########################################################################
# FTP:
###########################################################################
RUN apt-get update && apt-get install -y libssl-dev
RUN docker-php-ext-configure ftp --with-openssl-dir=/usr
&& docker-php-ext-install ftp
Is that the right thing to do?
Then I stop/start the php-fpm container as well as the whole Laradock container in Docker Desktop but I still get the same error when I run my script : Call to undefined function ftp_connect().
I would really appreciate some clear help on how to solve that issue as I need to get that script running before the end of the day.