I had requested to enable FileInfo php extension in one of the production server. What I know to solve this issue was recompile the php using EasyApache. Even though I can able to enable this extension using this mechanism, it takes lot of time and may be conflict with other php packages sometimes.
After having few minutes Googling, I found WHM itself has a separate tool which will called php-extension-manager to do the same. So this will be the best hazardless approach to manage php extesnions.
1. How to list the Third party extensions available for PHP
Available Extensions:
EAccelerator
IonCubeLoader
Zendopt
Xcache
SourceGuardian
PHPSuHosin
2. How to verify a third party extension is enabled or not
Determining status of EAccelerator
EAccelerator extension is NOT installed
root@web01 [~]#
3. Installing Extensions
4. Uninstalling Extensions
Uninstalling Xcache
Removing xcache from /usr/local/lib/php.ini
root@web01 [~]#
4. How to list all the php extension enabled
[PHP Modules]
apc
bcmath
bz2
calendar
Core
ctype
curl
date
dom
ereg
fileinfo
filter
ftp
gd
gettext
hash
iconv
imap
ionCube Loader
json
libxml
mbstring
--More--
5. How do I list a variable value configured in PHP
Eg : php -r ‘phpinfo();’ | grep “
memory_limit => 32M => 32M
root@web01 [~]#
Note : Each of PHP command line variables and Web server variables may not be same always. We can set each php.ini file for both environments.
6. How do I list all the php configuration files
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/curl.ini,
Leave a Reply