PHP 8.1 Extensions

katycomputer

Verified User
Joined
Jul 8, 2019
Messages
7
Our application requires bcmath,gmp,fileinfo,gd,json,mbstring,pdo,xml,curl,zip,gmp,mysqlnd PHP 8.1 extensions.

We are setting up a new DA instance on Debian 11. What is the optimal way to ensure these get added to our install?

Do we want to install these prior to running setup, will DA take care of this, or do we want to run this after setup?
apt -y install php8.1 php8.1-{bcmath,gmp,fileinfo,gd,json,mbstring,pdo,xml,curl,zip,gmp,mysqlnd}
 
We will be using Softaculous to install our application (Invoice Ninja), is it reasonable to assume Softaculous will take care of adding these extensions?
 
I followed instructions on https://docs.directadmin.com/webservices/php/php-extensions.html and ended up with this error:
cc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [Makefile:1151: ext/fileinfo/libmagic/apprentice.lo] Error 1

When specifying multiple modules in custom/php/configure.php81, do I use additional --with-module directives, or do I use a comma separated list? I appended this to the template:
--enable-intl \
--with-module=bcmath \
--with-module=curl \
--with-module=fileinfo \
--with-module=gd \
--with-module=gmp \
--with-module=json \
--with-module=mbstring \
--with-module=mysqlnd \
--with-module=pdo \
--with-module=xml \
--with-module=zip
 
are they all compatible with PHP 8.1?
also many of them need additional dependencies that must be installed from APT or compiled too.
check each at php.net
 
I followed instructions on https://docs.directadmin.com/webservices/php/php-extensions.html and ended up with this error:
cc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [Makefile:1151: ext/fileinfo/libmagic/apprentice.lo] Error 1

When specifying multiple modules in custom/php/configure.php81, do I use additional --with-module directives, or do I use a comma separated list? I appended this to the template:
--enable-intl \
--with-module=bcmath \
--with-module=curl \
--with-module=fileinfo \
--with-module=gd \
--with-module=gmp \
--with-module=json \
--with-module=mbstring \
--with-module=mysqlnd \
--with-module=pdo \
--with-module=xml \
--with-module=zip
You are compiling PHP with fileinfo extension, and PHP compilation with fileinfo require higher memory. Most likely, you have a very little amount of RAM. To solve this, you need to either add RAM or exclude fileinfo.
 
I am experimenting with DA on a 1GB server - so that's an issue. OTOH, when I only added bcmath, I got the same error.

If we proceed, our production servers have 8GB of ram in a Proxmox container, hopefully, 8GB will be adequate.
 
Back
Top