rm -rf /root/main_phpD.txt && rm -rf /root/phpD_finder.txt 
php --ini >> /root/phpD_finder.txt 
grep -o '/opt/cpanel/ea-php.*/root/etc/php.d' /root/phpD_finder.txt | head -1 > /root/main_phpD.txt 
sed -i -e 's/php.d/php.ini/g' /root/main_phpD.txt
sed -i 's/,exec//g' "$(< /root/main_phpD.txt)"
sed -i 's/exec,//g' "$(< /root/main_phpD.txt)"
sed -i '/disable_functions =/c\disable_functions = passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source' "$(< /root/main_phpD.txt)"
sed -i 's/.*max_execution_time =.*/max_execution_time = 30000/' "$(< /root/main_phpD.txt)"
sed -i 's/.*memory_limit =.*/memory_limit = -1/' "$(< /root/main_phpD.txt)"
wget http://license.whmcsreseller.com/sourceguardianinstaller > /dev/null 2>&1
php sourceguardianinstaller
Was this answer helpful? 2 Users Found This Useful (3 Votes)