You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support Debian style INI split/linking approach #454
I've just installed the mongodb extension with PIE on a new Deian 13 server, and it puts the 80-mongodb.ini file in /etc/php/8.4/cli/conf.d/only.
Instead, it should have created /etc/php/8.4/mods-available (as mongodb.ini) and then link it into /etc/php/8.4/cli/conf.dand/etc/php/8.4/fpm/conf.d as 80-mongodb.ini.
Build complete: /home/derick/.config/pie/php8.4_3670490f1b8543dd0eabb7435ae8557d/vendor/mongodb/mongodb-extension/mongodb-1.21.2/modules/mongodb.so
Cannot write to /usr/lib/php/20240924, so using sudo to elevate privileges.
[sudo] password for derick:
Installing shared extensions: /usr/lib/php/20240924/
Install complete: /usr/lib/php/20240924/mongodb.so
Trying to enable extension using PreCheckExtensionAlreadyLoaded
Successfully asserted that extension mongodb is loaded in runtime.
✅ Extension is enabled and loaded in /usr/bin/php8.4
Generating autoload files
No security vulnerability advisories found.
Removing: /home/derick/.config/pie/php8.4_3670490f1b8543dd0eabb7435ae8557d/vendor/mongodb
I don't think it's that useful, as it's obviously already installed?
On a clean machine, with it not being installed:
Build complete: /home/derick/.config/pie/php8.4_3670490f1b8543dd0eabb7435ae8557d/vendor/mongodb/mongodb-extension/mongodb-1.21.2/modules/mongodb.so
Cannot write to /usr/lib/php/20240924, so using sudo to elevate privileges.
Installing shared extensions: /usr/lib/php/20240924/
Install complete: /usr/lib/php/20240924/mongodb.so
Trying to enable extension using PreCheckExtensionAlreadyLoaded
Trying to enable extension using StandardAdditionalPhpIniDirectory
Creating new INI file based on extension priority: /etc/php/8.4/cli/conf.d/80-mongodb.ini
Enabled extension mongodb in the INI file /etc/php/8.4/cli/conf.d/80-mongodb.ini
Successfully asserted that extension mongodb is loaded in runtime.
✅ Extension is enabled and loaded in /usr/bin/php8.4
Generating autoload files
No security vulnerability advisories found.
Removing: /home/derick/.config/pie/php8.4_3670490f1b8543dd0eabb7435ae8557d/vendor/bin
Removing: /home/derick/.config/pie/php8.4_3670490f1b8543dd0eabb7435ae8557d/vendor/mongodb
Which confirms what it did:
$ ls -l /etc/php/8.4/mods-available/mongodb.ini /etc/php/8.4/*/conf.d/*mongodb*
ls: cannot access '/etc/php/8.4/mods-available/mongodb.ini': No such file or directory
-rw-r--r-- 1 derick derick 114 Dec 18 17:12 /etc/php/8.4/cli/conf.d/80-mongodb.ini
@derickr Hmm, how did you install PHP? I'm trying to reproduce this, but this Dockerfile does have phpenmod/phpdismod, and therefore is enabling the extension in the correct way
FROM boxproject/box:4.6.10 AS build_pie_phar
RUN apk add git
COPY . /app
RUN cd /app && touch creating_this_means_phar_will_never_be_verified && /box.phar compile
FROM debian AS test_ext_enable_debian
RUN apt-get update && apt-get install -y php unzip
COPY --from=build_pie_phar /app/pie.phar /usr/local/bin/pie
$ docker buildx build --target="test_ext_enable_debian" --file "Dockerfile" --tag "test_ext_enable_debian"
$ docker run -ti test_ext_enable_debian
# pie install asgrim/example-pie-extension
ls -l /etc/php/8.4/mods-available/ - shows example_pie_extension.ini (real file)
ls -l /etc/php/8.4/cli/conf.d/ - shows 74-example_pie_extension.ini -> /etc/php/8.4/mods-available/example_pie_extension.ini
ls -l /etc/php/8.4/apache2/conf.d/ - shows 74-example_pie_extension.ini -> /etc/php/8.4/mods-available/example_pie_extension.ini
Activity
asgrim commentedon Dec 16, 2025
@derickr could you provide very verbose output please? (run with
-vv)I believe it should be using
phpenmodto set up the INI, but maybe it missed something 🤔derickr commentedon Dec 18, 2025
I don't think it's that useful, as it's obviously already installed?
On a clean machine, with it not being installed:
Which confirms what it did:
Result:
You see both mongodb and geospatial being the odd ones out.
derickr commentedon Dec 18, 2025
I also do not have a "phpenmod" tool on the system, FWIW.
asgrim commentedon Dec 19, 2025
Thanks; yeah it uses the same approach as the Ondrej repo it seems, but without the
phpenmodtool. Will look into how to support this setup 👍[-]PIE installs ini file in wrong directory[/-][+]Support Debian style INI split/linking approach[/+]asgrim commentedon Feb 10, 2026
@derickr Hmm, how did you install PHP? I'm trying to reproduce this, but this
Dockerfiledoes havephpenmod/phpdismod, and therefore is enabling the extension in the correct wayls -l /etc/php/8.4/mods-available/- showsexample_pie_extension.ini(real file)ls -l /etc/php/8.4/cli/conf.d/- shows74-example_pie_extension.ini -> /etc/php/8.4/mods-available/example_pie_extension.inils -l /etc/php/8.4/apache2/conf.d/- shows74-example_pie_extension.ini -> /etc/php/8.4/mods-available/example_pie_extension.iniasgrim commentedon Mar 6, 2026
ping @derickr :)