Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/legale/phpenmod
Simple PHP extension enabler/disabler
https://github.com/legale/phpenmod
Last synced: 5 days ago
JSON representation
Simple PHP extension enabler/disabler
- Host: GitHub
- URL: https://github.com/legale/phpenmod
- Owner: legale
- License: mit
- Created: 2019-02-05T15:20:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T00:25:37.000Z (over 1 year ago)
- Last Synced: 2024-08-01T19:54:54.918Z (3 months ago)
- Language: Shell
- Size: 111 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpenmod
Simple PHP extension enabler/disabler[![phpenmod](https://github.com/legale/phpenmod/raw/master/screenshot.png)]
## Usage
Just compiled and installed php-src on Arch Linux### PHP installation
```
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
```### Extension installation
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### phpenmod installation
```
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
```### phpenmod usage example
#### Trying to enable installed extensions
```
[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.
```#### Listing scan directory
```
ls /etc/php/php.d/
```
Results:
```
10-readline.ini 20-mbstring.ini
```#### Trying to disable mbstring
```
phpdismod mbstring
cat 20-mbstring.ini
```
Results:
```
phpdismod: Trying to disable PHP extension mbstring...
phpdismod: Done.
;extension=mbstring
```#### Listing enabled PHP extensions
```
php -m
```
Results:
```
[PHP Modules]
Core
ctype
date
hash
pcre
readline
Reflection
SPL
standard[Zend Modules]
```