I have this Dockerfile:
FROM php:8.1.0-fpm RUN apt-get update && apt-get install -y zlib1g-dev g++ git libicu-dev zip libzip-dev zip libpng-dev libssl-dev libxslt-dev wkhtmltopdf procps acl && pecl install apcu && docker-php-ext-install intl opcache pdo pdo_mysql zip gd xsl -j$(nproc) && docker-php-ext-enable apcu opcache && docker-php-ext-configure zip # xmlrpc # channel://pecl.php.net/xmlrpc-1.0.0RC3 # php-xmlrpc # php-xml-rpc # php8.1-xmlrpc # php-pecl-xmlrpc # php81-pecl-xmlrpc # xmlrpc-1.0.0RC3
I've tried a lot of ways to include XML-RPC in it (see the commented line), but nothing works. I know this package is deprecated, but it's a dependency I absolutely need. It works fine in PHP 7.4, but I can't figure out what's going on with PHP 8.1.
Can anyone tell me?
P粉3164230892023-12-14 00:57:43
Add this command
RUN pecl install channel://pecl.php.net/xmlrpc-1.0.0RC3 xmlrpc
And don't forget to add "extension=xmlrpc.so" to the php.ini file.