Simple PHP extension enabler/disabler
Just compiled and installed php-src on Arch Linux
git clone https://github.com/php/php-src
cd php-src
./buildconf
./configure \
--disable-all \
--with-config-file-scan-dir=/etc/php/php.d \
--with-config-file-path=/etc/php/php.ini \
--enable-ctype \
make -j4 && sudo make install
cd ~/src/php-src/ext/readline phpize && ./configure && make -j4 && sudo make install cd ~/src/php-src/ext/mbstring phpize && ./configure && make -j4 && sudo make install
wget https://github.com/legale/phpenmod/raw/master/phpenmod -O ~/bin/phpenmod
chmod +x ~/bin/phpenmod
ln -s /home/ru/bin/phpenmod /home/ru/bin/phpdismod
[ru@ru-manjaro php.d]$ phpenmod readline mbstring
Results:
phpenmod: Ini file not found. Trying to create new...
phpenmod: Done.
phpenmod: Ini file not found. Trying to create new...
phpenmod: Done.
ls /etc/php/php.d/
Results:
10-readline.ini 20-mbstring.ini
phpdismod mbstring
cat 20-mbstring.ini
Results:
phpdismod: Trying to disable PHP extension mbstring...
phpdismod: Done.
;extension=mbstring
php -m
Results:
[PHP Modules]
Core
ctype
date
hash
pcre
readline
Reflection
SPL
standard
[Zend Modules]