Nextcloud 28 with php8.3 on Debian / Ubuntu - missing modules [solution]

Hello Nextclouders,

This may be of interest to those of you who want to test Nextcloud 28 with PHP 8.3 on Ubuntu 22.04 (or Debian).
You’ll probably use → the ppa/dpa from Ondřej Surý ← to get php8.3 in the first place, and you probably do the update with the meanwhile more than 1k times downloaded 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

Once installed, simply run it by caling it:

php-updater

it will update itselve automaticaly.


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

That’s why I wrote php-module-builder . It 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.

This table lists which modules are involved:

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

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

lua module for File Actions app:

This tool is helpful as well if you 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.

I signed the script, and it comes with an integrated updater to stay at the bleeding edge and an automated integrity test that checks after installation and every update.

Here an example echo:

ernolf@nc237:~$ php-module-builder
Usage: php-module-builder <php_version> <module> [--firstrun] [--remove] [--force] [--step]
         --firstrun  - first run wizard
         --remove    - remove module instead if install
         --force     - install or remove modules even though the script does not know if it works
         --step      - run everything step by step

- supported PHP-versions:     8.0 8.1 8.2 8.3
- supported (tested) modules: apcu excimer facedetect igbinary imagick lua lz4 memcache memcached msgpack redis rrd smbclient solr ssh2 stomp swoole tideways uopz uploadprogress uuid vips xdebug xhprof yac yaml zstd
- Built and installed modules:
  - PHP Version:     8.1
    Module Versions: lua-2.0.7
  ---------------------
  - PHP Version:     8.3
    Module Versions: apcu-5.1.23 igbinary-3.2.14 imagick-3.7.0 lua-2.0.7 redis-6.0.2 smbclient-1.1.1 xdebug-3.2.2 yaml-2.2.3 zstd-0.13.1
  ---------------------
- you can try to build a not tested module with "--force", please give me feedback about the result.

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:

1 Like

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