Newest php8.4 on Debian / Ubuntu - build missing modules with [php-module-builder]

Hello Nextclouders,

This may be of interest to those of you who want to test Nextcloud with the newest PHP 8.4 on Ubuntu or Debian.
You can easily set this up with these two scripts:

  1. php-updater


You’ll probably do your php updates already with the php-updater script with builtin php.net-defaults and -changelog of the most php-ini directives and a verbose explanation. Install it with:

sudo wget -qO /usr/local/bin/php-updater https://global-social.net/script/php-updater
sudo chmod +x /usr/local/bin/php-updater

Explanation:
- the first line downloads the script into the directory /usr/local/bin
- the second line makes it executable

You only need to install it once.
As all of my → ebtb ← scripts, it comes signed and does an integrity check on the first run and checks for updates on every startup.

Once installed, simply run it:

php-updater

… and choose to install the version php8.4. Abort the script at the point where the settings from your old php version (probably 8.2 or 8.3) are to be integrated into the new php8.4, because not all modules are installed yet at that point.

  1. php-module-builder


At the moment I’m writing this, PHP 8.4 is still in RC status, so in its early stages, and a lot of PHP modules are still not delivered, including some that are absolutely necessary to operate Nextcloud.

As after the release of php8.3, most modules will be delivered by the maintainer as package versions over time. Nevertheless, some modules will not be packaged and can be built with this script though, even if builds do not succeed with pecl.

The php-module-builder script makes it easy to build and install all essential modules that are not (yet) available as Debian packages. The modules installed with this tool can also be removed just as easily. So the entire administration for the self-built modules is handled by one script. There is no need to make any changes to the php.ini ; the modules are all integrated into PHP by the script with Debian-style symlinks and locations, along with their own little ini files.

It has an automatic patching function that scans the source code before building the modules and updates old deprecated functions and include-pathes to comply with the new version for php8.4. This means that you can already use modules not yet officially released for php8.4 yet.

Installation of the script:

sudo wget -qO /usr/local/bin/php-module-builder https://global-social.net/script/php-module-builder
sudo chmod +x /usr/local/bin/php-module-builder

Explanation:
- the first line downloads the script into the directory /usr/local/bin
- the second line makes it executable

once installed, simply run:

php-module-builder

After you have installed the missing modules for php8.4 like apcu, igbinary, imagick, lua and redis, you can run the migrationstep with

php-updater 8.3 8.4

(asuming php8.3 as your “old” php version)

As long as there is no official Nextcloud support for php8.4, this is probably more of a developer thing.
You can easily switch back and forth between the different installed php versions with

php-updater --switch-version

This table lists which modules are involved:

(last updated@15.10.2024)
Module 8.0 8.1 8.2 8.3 8.4 php-module-builder
amqp :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
apcu :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
ast :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
bcmath :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
brotli :red_circle: :red_circle: :red_circle: :red_circle: :red_circle: :white_check_mark:
bz2 :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
cgi :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
cli :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
common :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
curl :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
dba :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
decimal :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
dev :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
dio :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
ds :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
enchant :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
excimer :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
facedetect :green_circle: :green_circle: :red_circle: :red_circle: :red_circle: :white_check_mark:
fpm :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
gd :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
gearman :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
gmagick :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
gmp :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
gnupg :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
grpc :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
http :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
igbinary :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
imagick :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
imap :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
inotify :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
interbase :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
intl :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
ldap :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
libvirt-php :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
lua :red_circle: :red_circle: :red_circle: :red_circle: :red_circle: :white_check_mark:
lz4 :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
mailparse :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
maxminddb :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
mbstring :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
mcrypt :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
memcache :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
memcached :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
mongodb :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
msgpack :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
mysql :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
oauth :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
odbc :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
opcache :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
pcov :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
pgsql :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
phalcon5 :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
phpdbg :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
pinba :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
pq :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
propro :green_circle: :green_circle: :green_circle: :red_circle: :red_circle:
protobuf :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
ps :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
pspell :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
psr :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
raphf :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
rdkafka :green_circle: :green_circle: :green_circle: :green_circle: :red_circle:
readline :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
redis :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
rrd :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
smbclient :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
snmp :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
soap :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
solr :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
sqlite3 :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
ssh2 :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
stomp :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
swoole :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
sybase :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
tideways :green_circle: :green_circle: :green_circle: :red_circle: :red_circle: :white_check_mark:
tidy :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
uopz :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
uploadprogress :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
uuid :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
vips :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
xdebug :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
xhprof :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:
xml :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
xmlrpc :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
xsl :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
yac :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
yaml :green_circle: :green_circle: :green_circle: :green_circle: :green_circle: :white_check_mark:
zip :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
zmq :green_circle: :green_circle: :green_circle: :green_circle: :green_circle:
zstd :green_circle: :green_circle: :green_circle: :green_circle: :red_circle: :white_check_mark:

lua module for File Actions app:

This tool is helpful if you want to make use of the File Actions-files_scripts app, which relies on the Lua module that always has to be built.

Example call, to create php8.3-lua module:

php-module-builder 8.3 lua

It can only build one module per call. So if you need three modules, you will have to run it three times, one for every single module.


Happy hacking!
Much and good luck,
ernolf

9 Likes

This is really great! Thank you a lot.

I would suggest you to integrate it into nextcloud/all-in-one as it would be helpful for a lot of people. :slightly_smiling_face:

2 Likes

Hi @devnoname120

thank you for your kind feedback. :heart:

That’s not gonna happen because this script is intended for php on barremetal and AIO is a containerized solution where the PHP modules have to be built by the creator of the container. There is no such freedom there.


Much and good luck,
ernolf

1 Like

FYI:
Just updated all php admin scripts to handle php8.4


ernolf