# phpenmod/phpdismod

- Thread: https://externals.io/message/104045
- Original archive: https://news-web.php.net/php.internals/104045
- Started by Legale.legale on 2019-02-02T20:52:19+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #104045 — Legale.legale — 2019-02-02T20:52:19+00:00

URL: https://externals.io/message/104045#104045

For example:
phpenmod mysqli
will try to find an extension and if it exists, script will create related ini file in the conf.d directory.
phpdismod mysqli
will remove ini file from the conf.d dir.

It makes a world a bit more comfortable for me. :-)On Feb 2, 2019 21:39, Stanislav Malyshev <smalyshev@gmail.com> wrote:
>
> Hi! 
>
> On 2/2/19 12:34 PM, Legale Legage wrote: 
> > […]
>
> What you mean by enable/disable? Could you describe a use case for why 
> this script would be used by a developer? Or is this meant for the user 
> - then why the script would be used by the user? 
>
> -- 
> Stas Malyshev 
> smalyshev@gmail.com

---

## #104046 — johannes@schlueters.de — 2019-02-02T21:05:48+00:00

URL: https://externals.io/message/104045#104046 · In reply to: #104045

> For example:
> phpenmod mysqli
> will try to find an extension and if it exists, script will create
> related ini file in the conf.d directory.
> phpdismod mysqli
> will remove ini file from the conf.d dir.
> 
> It makes a world a bit more comfortable for me. :-)

Well, i doesn't do much to "find" it. It is a distribution-specific way
to manage symlinks to ini files.

All it does is to check whether

   /etc/php/7.0/mods-available/${extname}.ini

exists and if it does link it to

   /etc/php/7.0/${sapi}/conf.d/${extname}.ini

It doesn't help to find those extensions (which are to be installed via
apt) or similar.

The split of per-sapi ini scan dir is also Ubuntu-specific.

So in that form these scrips are quite useless for vanilla PHP.

Where such a mechanism can make sense is in a pecl installer, which
currently works by trying to edit the main php.ini file after building
the extension.

johannes
