Knowledgebase
Bash script to check ioCube and suphp is installed
Posted by arun123, 10-25-2011, 12:47 PM | Hi Friends
Kindly help me write a bash script to check ioncube loader is installed and also the suphp is enabled. I know "Php -v" will show the details of the ioncube loader and also i can get suphp information from "/usr/local/apache/conf/php.conf. But i don't know how to check it using a script. So if someone could some light on how to get do this.
|
Posted by host plugin, 10-25-2011, 01:01 PM | if you don't have the php function exec disabled then you can just simply use:
exec("php -v")
|
Posted by AH-Dan, 10-25-2011, 02:00 PM | If you are using CentOS & httpd like me, then your PHP ini file should be in /etc/.
To find out information regarding a variable, you could run this command.
To find out about ioncube, you could swap suphp for ioncube.
|
Posted by host plugin, 10-25-2011, 05:46 PM | oops for some reason i thought the op was asking for how to do this in php guess i need a new pair of glasses
|
Posted by arun123, 10-26-2011, 04:05 AM | Hi guyz,
Thanks for helping. I found a simple way to do this. Following is the script i used. Advice me if there is any other good methods.
#!/bin/bash
if (grep "/usr/local/IonCube/ioncube_loader" /usr/local/cpanel/3rdparty/etc/php.ini) > 0
then echo ionCube is installed
else echo ionCube is NOT installed
fi
if (grep "suPHP_Engine on" /usr/local/apache/conf/php.conf) >0
then echo suPHP is installed
else echo suPHP is NOT installed
fi
I really appreciate any suggestion
|
Posted by mattmackman, 12-28-2011, 03:56 AM | which control panel? So we can do a exec script
|
|
Add to Favourites
Print this Article |
Also Read