Initial commit for v2.4.3

This commit is contained in:
usmannasir
2025-08-01 14:56:30 +05:00
commit 6dd7114f6d
4521 changed files with 1795978 additions and 0 deletions

View File

@@ -0,0 +1,360 @@
#!/usr/local/CyberCP/bin/python
import os
import subprocess
import shlex
import plogical.CyberCPLogFileWriter as logging
from ApachController.ApacheVhosts import ApacheVhost
from plogical.processUtilities import ProcessUtilities
class ApacheController:
apacheInstallStatusPath = '/home/cyberpanel/apacheInstallStatus'
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
serverRootPath = '/etc/httpd'
configBasePath = '/etc/httpd/conf.d/'
phpBasepath = '/etc/opt/remi'
php54Path = '/opt/remi/php54/root/etc/php-fpm.d/'
php55Path = '/opt/remi/php55/root/etc/php-fpm.d/'
php56Path = '/etc/opt/remi/php56/php-fpm.d/'
php70Path = '/etc/opt/remi/php70/php-fpm.d/'
php71Path = '/etc/opt/remi/php71/php-fpm.d/'
php72Path = '/etc/opt/remi/php72/php-fpm.d/'
php73Path = '/etc/opt/remi/php73/php-fpm.d/'
php74Path = '/etc/opt/remi/php74/php-fpm.d/'
php80Path = '/etc/opt/remi/php80/php-fpm.d/'
php81Path = '/etc/opt/remi/php81/php-fpm.d/'
php82Path = '/etc/opt/remi/php82/php-fpm.d/'
php83Path = '/etc/opt/remi/php83/php-fpm.d/'
php84Path = '/etc/opt/remi/php84/php-fpm.d/'
php85Path = '/etc/opt/remi/php85/php-fpm.d/'
serviceName = 'httpd'
else:
serverRootPath = '/etc/apache2'
configBasePath = '/etc/apache2/sites-enabled/'
phpBasepath = '/etc/php'
php54Path = '/etc/php/5.4/fpm/pool.d/'
php55Path = '/etc/php/5.5/fpm/pool.d/'
php56Path = '/etc/php/5.6/fpm/pool.d/'
php70Path = '/etc/php/7.0/fpm/pool.d/'
php71Path = '/etc/php/7.1/fpm/pool.d/'
php72Path = '/etc/php/7.2/fpm/pool.d/'
php73Path = '/etc/php/7.3/fpm/pool.d/'
php74Path = '/etc/php/7.4/fpm/pool.d/'
php80Path = '/etc/php/8.0/fpm/pool.d/'
php81Path = '/etc/php/8.1/fpm/pool.d/'
php82Path = '/etc/php/8.2/fpm/pool.d/'
php83Path = '/etc/php/8.3/fpm/pool.d/'
php84Path = '/etc/php/8.4/fpm/pool.d/'
php85Path = '/etc/php/8.5/fpm/pool.d/'
serviceName = 'apache2'
mpmConfigs = """# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:
# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
LoadModule mpm_event_module modules/mod_mpm_event.so
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 30
MaxConnectionsPerChild 1000
</IfModule>"""
mpmConfigsPath = "/etc/httpd/conf.modules.d/00-mpm.conf"
@staticmethod
def checkIfApacheInstalled():
try:
if os.path.exists(ApacheController.php80Path):
return 1
else:
return 0
# if os.path.exists(ApacheVhost.php54Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php55Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php56Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php70Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php71Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php72Path):
# pass
# else:
# return 0
#
# if os.path.exists(ApacheVhost.php73Path):
# return 1
# else:
# return 0
except BaseException as msg:
message = "%s. [%s]" % (str(msg), '[ApacheController.checkIfApacheInstalled]')
logging.CyberCPLogFileWriter.writeToFile(message)
@staticmethod
def executioner(command):
try:
# subprocess.call(shlex.split(command))
res = subprocess.call(shlex.split(command))
if res == 1:
return 0
else:
return 1
except BaseException as msg:
logging.CyberCPLogFileWriter.writeToFile(str(msg))
return 0
@staticmethod
def InstallApache():
try:
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
command = "yum install -y httpd httpd-tools mod_ssl php-fpm"
else:
command = "apt update -y && sudo apt upgrade -y && apt install apache2 -y"
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to install Apache and PHP-FPM."
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
# command = "yum -y install centos-release-scl yum-utils"
# if ProcessUtilities.executioner(command) == 0:
# return "Failed to centos-release-scl and yum-utils"
#
# command = "yum-config-manager --enable rhel-server-rhscl-7-rpms"
# if ProcessUtilities.executioner(command) == 0:
# return "Failed to --enable rhel-server-rhscl-7-rpms"
sslPath = "/etc/httpd/conf.d/ssl.conf"
if os.path.exists(sslPath):
os.remove(sslPath)
confPath = ApacheVhost.serverRootPath + "/conf/httpd.conf"
CurrentConf = open(confPath, 'r').read()
if CurrentConf.find('Listen 8083') == -1:
data = open(confPath, 'r').readlines()
writeToFile = open(confPath, 'w')
for items in data:
if items.find("Listen") > -1 and items.find("80") > -1 and items.find('#') == -1:
writeToFile.writelines("Listen 8083\nListen 8082\n")
elif items.find("User") > -1 and items.find('#') == -1:
writeToFile.writelines("User nobody\n")
elif items.find("Group") > -1 and items.find('#') == -1:
writeToFile.writelines("Group nobody\n")
writeToFile.writelines('SetEnv LSWS_EDITION Openlitespeed\nSetEnv X-LSCACHE on\n')
elif items[0] == "#":
continue
else:
writeToFile.writelines(items)
writeToFile.close()
# MPM Module Configurations
writeToFile = open(ApacheController.mpmConfigsPath, 'w')
writeToFile.write(ApacheController.mpmConfigs)
writeToFile.close()
else:
confPath = ApacheVhost.serverRootPath + "/apache2.conf"
portsPath = '/etc/apache2/ports.conf'
WriteToFile = open(portsPath, 'w')
WriteToFile.write('Listen 8083\nListen 8082\n')
WriteToFile.close()
command = f"sed -i 's/User ${{APACHE_RUN_USER}}/User nobody/g' {confPath}"
if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run user change failed"
command = f"sed -i 's/Group ${{APACHE_RUN_GROUP}}/Group nogroup/g' {confPath}"
if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run group change failed"
command = 'apt-get install apache2-suexec-pristine -y'
if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run apache2-suexec-pristine"
command = 'a2enmod suexec proxy ssl proxy_fcgi proxy rewrite headers'
if ProcessUtilities.executioner(command, None, True) == 0:
return "Apache run suexec proxy ssl"
WriteToFile = open(confPath, 'a')
WriteToFile.writelines('\nSetEnv LSWS_EDITION Openlitespeed\nSetEnv X-LSCACHE on\n')
WriteToFile.close()
###
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
serviceName = 'httpd'
else:
serviceName = 'apache2'
command = f"systemctl start {serviceName}.service"
ApacheController.executioner(command)
command = f"systemctl enable {serviceName}.service"
ApacheController.executioner(command)
return 1
except BaseException as msg:
return str(msg)
@staticmethod
def phpVersions():
# Version 5.4
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
if ProcessUtilities.alma9check == 1:
command = 'yum install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm'
else:
command = 'yum install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm'
ApacheController.executioner(command)
command = "yum install -y php?? php??-php-fpm php??-php-mysql php??-php-curl php??-php-gd php??-php-mbstring php??-php-xml php??-php-zip php??-php-intl"
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to install php54-fpm"
else:
command = 'apt-get install software-properties-common -y'
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to install software-properties-common"
command = 'apt install python-software-properties -y'
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to install python-software-properties"
command = 'add-apt-repository ppa:ondrej/php -y'
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to ppa:ondrej/php"
command = "DEBIAN_FRONTEND=noninteractive apt-get install -y php-fpm php?.?-fpm php?.?-fpm php?.?-mysql php?.?-curl php?.?-gd php?.?-mbstring php?.?-xml php?.?-zip php?.?-intl"
if ProcessUtilities.executioner(command, None, True) == 0:
return "Failed to install Apache and PHP-FPM."
from plogical.upgrade import Upgrade
Upgrade.CreateMissingPoolsforFPM()
# try:
# wwwConfPath = ApacheVhost.php54Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php55Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php56Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php70Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php71Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php72Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
#
# wwwConfPath = ApacheVhost.php73Path + "/www.conf"
#
# if os.path.exists(wwwConfPath):
# os.remove(wwwConfPath)
# except:
# pass
return 1
@staticmethod
def setupApache(statusFile):
try:
logging.CyberCPLogFileWriter.statusWriter(statusFile, 'Starting Apache installation. It may take some time..,70')
result = ApacheController.InstallApache()
if result != 1:
return [0,result]
logging.CyberCPLogFileWriter.statusWriter(statusFile,
'Installing PHP-FPM Versions. It may take some time..,80')
result = ApacheController.phpVersions()
if result != 1:
return [0,result]
return [1, 'None']
except BaseException as msg:
return [0, str(msg)]

View File

@@ -0,0 +1,679 @@
#!/usr/local/CyberCP/bin/python
import os
import os.path
import sys
import django
sys.path.append('/usr/local/CyberCP')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings")
django.setup()
import os
from websiteFunctions.models import Websites, ChildDomains
from plogical.vhostConfs import vhostConfs
from managePHP.phpManager import PHPManager
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
from plogical.processUtilities import ProcessUtilities
import re
class ApacheVhost:
apacheInstallStatusPath = '/home/cyberpanel/apacheInstallStatus'
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
serverRootPath = '/etc/httpd'
configBasePath = '/etc/httpd/conf.d/'
php54Path = '/opt/remi/php54/root/etc/php-fpm.d/'
php55Path = '/opt/remi/php55/root/etc/php-fpm.d/'
php56Path = '/etc/opt/remi/php56/php-fpm.d/'
php70Path = '/etc/opt/remi/php70/php-fpm.d/'
php71Path = '/etc/opt/remi/php71/php-fpm.d/'
php72Path = '/etc/opt/remi/php72/php-fpm.d/'
php73Path = '/etc/opt/remi/php73/php-fpm.d/'
php74Path = '/etc/opt/remi/php74/php-fpm.d/'
php80Path = '/etc/opt/remi/php80/php-fpm.d/'
php81Path = '/etc/opt/remi/php81/php-fpm.d/'
php82Path = '/etc/opt/remi/php82/php-fpm.d/'
php83Path = '/etc/opt/remi/php83/php-fpm.d/'
php84Path = '/etc/opt/remi/php84/php-fpm.d/'
php85Path = '/etc/opt/remi/php85/php-fpm.d/'
serviceName = 'httpd'
else:
serverRootPath = '/etc/apache2'
configBasePath = '/etc/apache2/sites-enabled/'
php54Path = '/etc/php/5.4/fpm/pool.d/'
php55Path = '/etc/php/5.5/fpm/pool.d/'
php56Path = '/etc/php/5.6/fpm/pool.d/'
php70Path = '/etc/php/7.0/fpm/pool.d/'
php71Path = '/etc/php/7.1/fpm/pool.d/'
php72Path = '/etc/php/7.2/fpm/pool.d/'
php73Path = '/etc/php/7.3/fpm/pool.d/'
php74Path = '/etc/php/7.4/fpm/pool.d/'
php80Path = '/etc/php/8.0/fpm/pool.d/'
php81Path = '/etc/php/8.1/fpm/pool.d/'
php82Path = '/etc/php/8.2/fpm/pool.d/'
php83Path = '/etc/php/8.3/fpm/pool.d/'
php84Path = '/etc/php/8.4/fpm/pool.d/'
php85Path = '/etc/php/8.5/fpm/pool.d/'
serviceName = 'apache2'
lswsMainConf = "/usr/local/lsws/conf/httpd_config.conf"
count = 0
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
sslBasePath = "/etc/httpd/conf.d/ssl/"
else:
sslBasePath = "/etc/apache2/conf-enabled/"
@staticmethod
def DecidePHPPath(php, virtualHostName):
if php == '53' or php == '54':
finalConfPath = ApacheVhost.php54Path + virtualHostName
elif php == '55':
finalConfPath = ApacheVhost.php55Path + virtualHostName
elif php == '56':
finalConfPath = ApacheVhost.php56Path + virtualHostName
elif php == '70':
finalConfPath = ApacheVhost.php70Path + virtualHostName
elif php == '71':
finalConfPath = ApacheVhost.php71Path + virtualHostName
elif php == '72':
finalConfPath = ApacheVhost.php72Path + virtualHostName
elif php == '73':
finalConfPath = ApacheVhost.php73Path + virtualHostName
elif php == '74':
finalConfPath = ApacheVhost.php74Path + virtualHostName
elif php == '80':
finalConfPath = ApacheVhost.php80Path + virtualHostName
elif php == '81':
finalConfPath = ApacheVhost.php81Path + virtualHostName
elif php == '82':
finalConfPath = ApacheVhost.php82Path + virtualHostName
elif php == '83':
finalConfPath = ApacheVhost.php83Path + virtualHostName
elif php == '84':
finalConfPath = ApacheVhost.php84Path + virtualHostName
elif php == '85':
finalConfPath = ApacheVhost.php85Path + virtualHostName
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(f'Decided path in DecidePHPPath {finalConfPath}.conf')
return finalConfPath + '.conf'
@staticmethod
def whichPHPExists(virtualHostName):
virtualHostName = virtualHostName + ".conf"
if os.path.exists(ApacheVhost.php54Path + virtualHostName):
return ApacheVhost.php54Path + virtualHostName
if os.path.exists(ApacheVhost.php55Path + virtualHostName):
return ApacheVhost.php55Path + virtualHostName
if os.path.exists(ApacheVhost.php56Path + virtualHostName):
return ApacheVhost.php56Path + virtualHostName
if os.path.exists(ApacheVhost.php70Path + virtualHostName):
return ApacheVhost.php70Path + virtualHostName
if os.path.exists(ApacheVhost.php71Path + virtualHostName):
return ApacheVhost.php71Path + virtualHostName
if os.path.exists(ApacheVhost.php72Path + virtualHostName):
return ApacheVhost.php72Path + virtualHostName
if os.path.exists(ApacheVhost.php73Path + virtualHostName):
return ApacheVhost.php73Path + virtualHostName
if os.path.exists(ApacheVhost.php74Path + virtualHostName):
return ApacheVhost.php74Path + virtualHostName
if os.path.exists(ApacheVhost.php80Path + virtualHostName):
return ApacheVhost.php80Path + virtualHostName
if os.path.exists(ApacheVhost.php81Path + virtualHostName):
return ApacheVhost.php81Path + virtualHostName
if os.path.exists(ApacheVhost.php82Path + virtualHostName):
return ApacheVhost.php82Path + virtualHostName
if os.path.exists(ApacheVhost.php83Path + virtualHostName):
return ApacheVhost.php83Path + virtualHostName
if os.path.exists(ApacheVhost.php84Path + virtualHostName):
return ApacheVhost.php84Path + virtualHostName
if os.path.exists(ApacheVhost.php85Path + virtualHostName):
return ApacheVhost.php85Path + virtualHostName
@staticmethod
def GenerateSelfSignedSSL(virtualHostName):
if os.path.exists(ApacheVhost.sslBasePath):
pass
else:
os.mkdir(ApacheVhost.sslBasePath)
pathToStoreSSLPrivKey = ApacheVhost.sslBasePath + ".privkey.pem"
pathToStoreSSLFullChain = ApacheVhost.sslBasePath + ".fullchain.pem"
command = 'openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout ' + pathToStoreSSLPrivKey + ' -out ' + pathToStoreSSLFullChain
ProcessUtilities.normalExecutioner(command)
@staticmethod
def perHostVirtualConf(administratorEmail,externalApp, virtualHostUser, phpVersion, virtualHostName):
try:
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
sockPath = '/var/run/php-fpm/'
group = 'nobody'
else:
sockPath = '/var/run/php/'
group = 'nogroup'
## Non-SSL Conf
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
confFile = open(finalConfPath, "w+")
php = PHPManager.getPHPString(phpVersion)
currentConf = vhostConfs.apacheConf
currentConf = currentConf.replace('{virtualHostName}', virtualHostName)
currentConf = currentConf.replace('{administratorEmail}', administratorEmail)
currentConf = currentConf.replace('{virtualHostUser}', virtualHostUser)
currentConf = currentConf.replace('{php}', php)
currentConf = currentConf.replace('{adminEmails}', administratorEmail)
currentConf = currentConf.replace('{externalApp}', virtualHostUser)
currentConf = currentConf.replace('{sockPath}', sockPath)
confFile.write(currentConf)
confFile.close()
## SSL Conf
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
confFile = open(finalConfPath, "a")
php = PHPManager.getPHPString(phpVersion)
currentConf = vhostConfs.apacheConfSSL
currentConf = currentConf.replace('{virtualHostName}', virtualHostName)
currentConf = currentConf.replace('{administratorEmail}', administratorEmail)
currentConf = currentConf.replace('{virtualHostUser}', virtualHostUser)
currentConf = currentConf.replace('{php}', php)
currentConf = currentConf.replace('{adminEmails}', administratorEmail)
currentConf = currentConf.replace('{externalApp}', virtualHostUser)
currentConf = currentConf.replace('{SSLBase}', ApacheVhost.sslBasePath)
currentConf = currentConf.replace('{sockPath}', sockPath)
confFile.write(currentConf)
confFile.close()
##
finalConfPath = ApacheVhost.DecidePHPPath(php, virtualHostName)
confFile = open(finalConfPath, "w+")
currentConf = vhostConfs.phpFpmPool
currentConf = currentConf.replace('{www}', virtualHostUser)
currentConf = currentConf.replace('{Sock}', virtualHostName)
currentConf = currentConf.replace('{externalApp}', externalApp)
currentConf = currentConf.replace('{sockPath}', sockPath)
currentConf = currentConf.replace('{group}', group)
confFile.write(currentConf)
ApacheVhost.GenerateSelfSignedSSL(virtualHostName)
command = f"systemctl restart {ApacheVhost.serviceName}"
ProcessUtilities.normalExecutioner(command)
return [1, 'None']
except BaseException as msg:
return [0, str(msg)]
@staticmethod
def enableProxyInMainConf():
try:
data = open(ApacheVhost.lswsMainConf, 'r').readline()
putProxyConf = 1
putProxyConfSSL = 1
for items in data:
if items.find('apachebackend') > -1:
putProxyConf = 0
if items.find('proxyApacheBackendSSL') > -1:
putProxyConfSSL = 0
if putProxyConf:
confFile = open(ApacheVhost.lswsMainConf, "a")
confFile.write(vhostConfs.proxyApacheBackend)
confFile.close()
if putProxyConfSSL:
confFile = open(ApacheVhost.lswsMainConf, "a")
confFile.write(vhostConfs.proxyApacheBackendSSL)
confFile.close()
return [1, 'None']
except BaseException as msg:
return [0, str(msg)]
@staticmethod
def reWrite(domain_name):
try:
domainPath = '/home/' + domain_name + '/public_html/.htaccess'
confFile = open(domainPath, "w+")
confFile.write("REWRITERULE ^(.*)$ HTTP://apachebackend/$1 [P]")
confFile.close()
return [1, 'None']
except BaseException as msg:
return [0, str(msg)]
@staticmethod
def setupApacheVhost(administratorEmail,externalApp, virtualHostUser, phpVersion, virtualHostName):
result = ApacheVhost.perHostVirtualConf(administratorEmail,externalApp, virtualHostUser, phpVersion, virtualHostName)
if result[0] == 0:
return [0, result[1]]
result = ApacheVhost.enableProxyInMainConf()
if result[0] == 0:
return [0, result[1]]
return [1, 'None']
@staticmethod
def perHostVirtualConfChild(administratorEmail, externalApp, virtualHostUser, phpVersion, virtualHostName, path):
try:
## Non - SSL Conf
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
sockPath = '/var/run/php-fpm/'
group = 'nobody'
else:
sockPath = '/var/run/php/'
group = 'nogroup'
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
confFile = open(finalConfPath, "w+")
php = PHPManager.getPHPString(phpVersion)
currentConf = vhostConfs.apacheConfChild
currentConf = currentConf.replace('{virtualHostName}', virtualHostName)
currentConf = currentConf.replace('{administratorEmail}', administratorEmail)
currentConf = currentConf.replace('{php}', php)
currentConf = currentConf.replace('{adminEmails}', administratorEmail)
currentConf = currentConf.replace('{externalApp}', virtualHostUser)
currentConf = currentConf.replace('{path}', path)
currentConf = currentConf.replace('{sockPath}', sockPath)
confFile.write(currentConf)
confFile.close()
## SSL Conf
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
confFile = open(finalConfPath, "a")
php = PHPManager.getPHPString(phpVersion)
currentConf = vhostConfs.apacheConfChildSSL
currentConf = currentConf.replace('{virtualHostName}', virtualHostName)
currentConf = currentConf.replace('{administratorEmail}', administratorEmail)
currentConf = currentConf.replace('{php}', php)
currentConf = currentConf.replace('{adminEmails}', administratorEmail)
currentConf = currentConf.replace('{externalApp}', virtualHostUser)
currentConf = currentConf.replace('{path}', path)
currentConf = currentConf.replace('{sockPath}', sockPath)
currentConf = currentConf.replace('{SSLBase}', ApacheVhost.sslBasePath)
confFile.write(currentConf)
confFile.close()
## SSL Conf
finalConfPath = ApacheVhost.DecidePHPPath(php, virtualHostName)
confFile = open(finalConfPath, "w+")
currentConf = vhostConfs.phpFpmPool
currentConf = currentConf.replace('{www}', "".join(re.findall("[a-zA-Z]+", virtualHostName))[:7])
currentConf = currentConf.replace('{Sock}', virtualHostName)
currentConf = currentConf.replace('{externalApp}', externalApp)
currentConf = currentConf.replace('{sockPath}', sockPath)
currentConf = currentConf.replace('{group}', group)
confFile.write(currentConf)
ApacheVhost.GenerateSelfSignedSSL(virtualHostName)
command = f"systemctl restart {ApacheVhost.serviceName}"
ProcessUtilities.normalExecutioner(command)
return [1, 'None']
except BaseException as msg:
return [0, str(msg)]
@staticmethod
def setupApacheVhostChild(administratorEmail, externalApp, virtualHostUser, phpVersion, virtualHostName, path):
result = ApacheVhost.perHostVirtualConfChild(administratorEmail, externalApp, virtualHostUser, phpVersion,
virtualHostName, path)
if result[0] == 0:
return [0, result[1]]
result = ApacheVhost.enableProxyInMainConf()
if result[0] == 0:
return [0, result[1]]
return [1, 'None']
@staticmethod
def DeleteApacheVhost(virtualHostName):
try:
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
if os.path.exists(finalConfPath):
os.remove(finalConfPath)
ApacheVhost.deletePHPPath(virtualHostName)
command = f"systemctl restart {ApacheVhost.serviceName}"
ProcessUtilities.normalExecutioner(command)
except BaseException as msg:
logging.writeToFile(str(msg))
@staticmethod
def perHostVirtualConfOLS(vhFile, administratorEmail):
# General Configurations tab
try:
confFile = open(vhFile, "w+")
virtualHostName = vhFile.split('/')[6]
currentConf = vhostConfs.OLSLBConf
currentConf = currentConf.replace('{adminEmails}', administratorEmail)
currentConf = currentConf.replace('{domain}', virtualHostName)
confFile.write(currentConf)
confFile.close()
except BaseException as msg:
logging.writeToFile(
str(msg) + " [IO Error with per host config file [ApacheVhosts.perHostVirtualConf]]")
@staticmethod
def deletePHPPath(virtualHostName):
phpPath = ApacheVhost.DecidePHPPath('54', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php54-php-fpm'
else:
phpService = f"php5.4-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('55', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php55-php-fpm'
else:
phpService = f"php5.5-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('56', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php56-php-fpm'
else:
phpService = f"php5.6-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('70', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php70-php-fpm'
else:
phpService = f"php7.0-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('71', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php71-php-fpm'
else:
phpService = f"php7.1-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('72', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php72-php-fpm'
else:
phpService = f"php7.2-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('73', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php73-php-fpm'
else:
phpService = f"php7.3-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('74', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php74-php-fpm'
else:
phpService = f"php7.4-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('80', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php80-php-fpm'
else:
phpService = f"php8.0-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('81', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php81-php-fpm'
else:
phpService = f"php8.1-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('82', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php82-php-fpm'
else:
phpService = f"php8.2-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('83', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php83-php-fpm'
else:
phpService = f"php8.3-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('84', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php84-php-fpm'
else:
phpService = f"php8.4-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
phpPath = ApacheVhost.DecidePHPPath('85', virtualHostName)
if os.path.exists(phpPath):
os.remove(phpPath)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpService = f'php85-php-fpm'
else:
phpService = f"php8.5-fpm"
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
@staticmethod
def changePHP(phpVersion, vhFile):
try:
logging.writeToFile(f"PHP version passed to Apache function: {phpVersion}")
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
sockPath = '/var/run/php-fpm/'
group = 'nobody'
else:
sockPath = '/var/run/php/'
group = 'nogroup'
virtualHostName = vhFile.split('/')[6]
finalConfPath = ApacheVhost.configBasePath + virtualHostName + '.conf'
if not os.path.exists(finalConfPath):
logging.writeToFile(f'Config path: {finalConfPath}')
return 0
ApacheVhost.deletePHPPath(virtualHostName)
try:
website = Websites.objects.get(domain=virtualHostName)
externalApp = website.externalApp
except:
child = ChildDomains.objects.get(domain=virtualHostName)
externalApp = child.master.externalApp
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(f"PHP version before getPHPString: {phpVersion}")
php = PHPManager.getPHPString(phpVersion)
finalConfPath = ApacheVhost.DecidePHPPath(php, virtualHostName)
logging.writeToFile(f'apache php final path: {finalConfPath}')
confFile = open(finalConfPath, "w+")
currentConf = vhostConfs.phpFpmPool
currentConf = currentConf.replace('{www}', externalApp)
currentConf = currentConf.replace('{Sock}', virtualHostName)
currentConf = currentConf.replace('{externalApp}', externalApp)
currentConf = currentConf.replace('{sockPath}', sockPath)
currentConf = currentConf.replace('{group}', group)
confFile.write(currentConf)
### minor bug fix of updating default php conf user in selected fpm
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
defaultConfPath = finalConfPath.replace(virtualHostName, 'www')
command = f"sed -i 's/www-data/apache/g' {defaultConfPath}"
ProcessUtilities.executioner(command)
phpService = ApacheVhost.DecideFPMServiceName(phpVersion)
command = f"systemctl stop {phpService}"
ProcessUtilities.normalExecutioner(command)
command = f"systemctl restart {phpService}"
ProcessUtilities.normalExecutioner(command)
command = f"systemctl restart {ApacheVhost.serviceName}"
ProcessUtilities.normalExecutioner(command)
return 1
except BaseException as msg:
logging.writeToFile(str(msg))
return 1
@staticmethod
def DecidePHPPathforManager(apache, phpVers):
if apache == 0 or apache == None:
phpVers = "php" + PHPManager.getPHPString(phpVers)
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
path = "/usr/local/lsws/ls" + phpVers + "/etc/php.ini"
else:
initial = phpVers[3]
final = phpVers[4]
completeName = str(initial) + '.' + str(final)
path = "/usr/local/lsws/ls" + phpVers + "/etc/php/" + completeName + "/litespeed/php.ini"
else:
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
phpVers = "php" + PHPManager.getPHPString(phpVers)
path = f'/etc/opt/remi/{phpVers}/php.ini'
else:
path = f'/etc/php/{phpVers.split(" ")[1]}/fpm/php.ini'
if os.path.exists(ProcessUtilities.debugPath):
logging.writeToFile(f'PHP Path {path}')
return path
@staticmethod
def DecideFPMServiceName(phpVersion):
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
php = PHPManager.getPHPString(phpVersion)
return f'php{php}-php-fpm'
else:
return f"{phpVersion.replace(' ', '').lower()}-fpm"

View File

@@ -0,0 +1,73 @@
import smtplib
import time
import argparse
import subprocess
import shlex
import os
class BackupUtil:
@staticmethod
def normalExecutioner(command):
try:
res = subprocess.call(shlex.split(command))
if res == 0:
return 1
else:
return 0
except BaseException as msg:
return 0
@staticmethod
def SendEmail(message):
sender = 'info@designti01.cyberhosting.org'
receivers = ['jeanftellier@gmail.com', 'jeanftellier@gmail.com']
try:
smtpObj = smtplib.SMTP('127.0.0.1')
smtpObj.sendmail(sender, receivers, message)
print("Successfully sent email")
except BaseException as msg:
print("Error: unable to send email %s" % str(msg))
@staticmethod
def SyncHome():
command = 'rsync -avz /home /mnt/HC_Volume_2760413'
BackupUtil.normalExecutioner(command)
message = "/home successfully synced on %s" % (time.strftime("%I-%M-%S-%a-%b-%Y"))
BackupUtil.SendEmail(message)
@staticmethod
def BackupDBS():
command = "/usr/local/CyberCP/ApachController/backup.sh"
BackupUtil.normalExecutioner(command)
message = "Database backups successfully generated on %s" % (time.strftime("%I-%M-%S-%a-%b-%Y"))
BackupUtil.SendEmail(message)
@staticmethod
def MoveAllBackups():
for virtualHost in os.listdir("/home"):
completePath = "/home/%s/backup/" % (virtualHost)
command = "mv %s %s" % (completePath + '*.tar.gz', '/home/backup/')
subprocess.call(command, shell=True)
def main():
parser = argparse.ArgumentParser(description='CyberPanel Backup tool.')
parser.add_argument('function', help='Specific a function to call!')
args = parser.parse_args()
if args.function == "home":
BackupUtil.SyncHome()
elif args.function == "db":
BackupUtil.BackupDBS()
elif args.function == "sync":
BackupUtil.MoveAllBackups()
if __name__ == "__main__":
main()

View File

19
ApachController/backup.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
USER="root"
PASSWORD="1d1bb076c3bd9ae9ef545e3eafb1a35c68d3c5f4a6c03862"
#OUTPUT="/Users/rabino/DBs"
cd /mnt/HC_Volume_2760413
#rm "$OUTPUTDIR/*gz" > /dev/null 2>&1
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database`
mkdir `date +%Y%m%d`
for db in $databases; do
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then
echo "Dumping database: $db"
mysqldump -u $USER -p$PASSWORD --databases $db > `date +%Y%m%d`/`date +%Y%m%d`.$db.sql
# gzip $OUTPUT/`date +%Y%m%d`.$db.sql
fi
done

View File

@@ -0,0 +1,459 @@
<?xml version="1.0" ?>
<php>
<extension>
<extensionName>php%s-php-zstd</extensionName>
<extensionDescription>: Zstd Extension for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-zephir-parser</extensionName>
<extensionDescription>Zephir parser extension</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-xmlrpc</extensionName>
<extensionDescription>A module for PHP applications which use the XML-RPC</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-xml</extensionName>
<extensionDescription>A module for PHP applications which use XML</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-xcache</extensionName>
<extensionDescription>Fast, stable PHP opcode cacher</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-twig</extensionName>
<extensionDescription>The flexible, fast, and secure template engine for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-tidy</extensionName>
<extensionDescription>Standard PHP module provides tidy library support</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-tarantool</extensionName>
<extensionDescription>PHP driver for Tarantool/Box</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-suhosin</extensionName>
<extensionDescription>Suhosin is an advanced protection system for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-soap</extensionName>
<extensionDescription>A module for PHP applications that use the SOAP protocol</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-snmp</extensionName>
<extensionDescription>A module for PHP applications that query SNMP-managed devices</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-snappy</extensionName>
<extensionDescription>Snappy Extension for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-smbclient</extensionName>
<extensionDescription>PHP wrapper for libsmbclient</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-recode</extensionName>
<extensionDescription>A module for PHP applications for using the recode library</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pspell</extensionName>
<extensionDescription>A module for PHP applications for using pspell interfaces</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-process</extensionName>
<extensionDescription>Modules for PHP script using system process interfaces</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-pimple</extensionName>
<extensionDescription>A simple dependency injection container for PHP Extensions</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-phurple</extensionName>
<extensionDescription>PHP bindings for libpurple</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-phpiredis</extensionName>
<extensionDescription>Client extension for Redis</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-phalcon3</extensionName>
<extensionDescription>Phalcon Framework</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pgsql</extensionName>
<extensionDescription>A PostgreSQL database module for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-zmq</extensionName>
<extensionDescription>ZeroMQ messaging</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-zip</extensionName>
<extensionDescription>Une extension de gestion des ZIP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yp</extensionName>
<extensionDescription>YP/NIS functions</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yaz</extensionName>
<extensionDescription>Z39.50/SRU client</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yar</extensionName>
<extensionDescription>Light, concurrent RPC framework</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yaml</extensionName>
<extensionDescription>PHP Bindings for yaml</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yaf</extensionName>
<extensionDescription>Extension to work with the Memcached caching daemon.</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yac</extensionName>
<extensionDescription>Yet Another Framework</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-yac</extensionName>
<extensionDescription>Lockless user data cache</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xxtea</extensionName>
<extensionDescription>XXTEA encryption algorithm extension for PHP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xslcache</extensionName>
<extensionDescription>XSL extension that caches the parsed XSL style sheet</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xrange</extensionName>
<extensionDescription>Numeric iterator primitives</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xmp</extensionName>
<extensionDescription>Bindings for the libxmp library</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xmldiff</extensionName>
<extensionDescription>XML diff and merge.</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xhprof</extensionName>
<extensionDescription>PHP extension for XHProf, a Hierarchical Profiler</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xdiff</extensionName>
<extensionDescription> File differences/patches.</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xdebug</extensionName>
<extensionDescription>PECL package for debugging PHP scripts</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-xattr</extensionName>
<extensionDescription> Extended attributes</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-wxwidgets</extensionName>
<extensionDescription>Cross-platform widget toolkit</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-weakref</extensionName>
<extensionDescription>Implementation of weak references</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-vld</extensionName>
<extensionDescription>Dump the internal representation of PHP scripts</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pecl-varnish</extensionName>
<extensionDescription>Varnish Cache bindings</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-pear.noarch</extensionName>
<extensionDescription>PHP Extension and Application Repository framework</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-pdo</extensionName>
<extensionDescription>A database access abstraction module for PHP applications</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-opcache</extensionName>
<extensionDescription>The Zend OPcache</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-odbc</extensionName>
<extensionDescription>A module for PHP applications that use ODBC databases</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-oci8</extensionName>
<extensionDescription>A module for PHP applications that use OCI8 databases</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-mysqlnd</extensionName>
<extensionDescription> A module for PHP applications that use MySQL Database</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-mssql</extensionName>
<extensionDescription>MSSQL database module for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-mcrypt</extensionName>
<extensionDescription>Standard PHP module provides mcrypt library support</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-mbstring</extensionName>
<extensionDescription>A module for PHP applications which need multi-byte String handle</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-maxminddb</extensionName>
<extensionDescription>MaxMind DB Reader extension</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-magickwand</extensionName>
<extensionDescription>PHP API for ImageMagick</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-lz4</extensionName>
<extensionDescription>LZ4 Extension for PHP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-libvirt-doc</extensionName>
<extensionDescription>Document of php-libvirt</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-libvirt</extensionName>
<extensionDescription>PHP language binding for Libvirt</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-ldap</extensionName>
<extensionDescription>A module for PHP applications that use LDAP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-ioncube-loader</extensionName>
<extensionDescription>Loader for ionCube Encoded Files with ionCube</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-intl</extensionName>
<extensionDescription>Internationalization extension for PHP applications</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-interbase</extensionName>
<extensionDescription> A module for PHP applications that use Interbase/Firebird databases</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-imap</extensionName>
<extensionDescription>A module for PHP applications that use IMAPs</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-horde-horde-lz4</extensionName>
<extensionDescription>Horde LZ4 Compression Extension</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-gmp</extensionName>
<extensionDescription>A module for PHP applications for using the GNU MP library</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-geos</extensionName>
<extensionDescription>PHP module for GEOS</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-gd</extensionName>
<extensionDescription> A module for PHP applications for using the gd graphics library</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-enchant</extensionName>
<extensionDescription> Enchant spelling extension for PHP applications</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-embedded</extensionName>
<extensionDescription>PHP library for embedding in applications</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-devel</extensionName>
<extensionDescription>Files needed for building PHP extensions</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-dbg</extensionName>
<extensionDescription>The interactive PHP debugger</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-dba</extensionName>
<extensionDescription>A database abstraction layer module for PHP applications</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-common</extensionName>
<extensionDescription>Common files for PHP</extensionDescription>
<status>1</status>
</extension>
<extension>
<extensionName>php%s-php-cli</extensionName>
<extensionDescription>Command-line interface for PHP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-channel-horde.noarch</extensionName>
<extensionDescription>Adds pear.horde.org channel to PEAR</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-brotli</extensionName>
<extensionDescription>Brotli Extension for PHP</extensionDescription>
<status>0</status>
</extension>
<extension>
<extensionName>php%s-php-bcmath</extensionName>
<extensionDescription>A module for PHP applications for using the bcmath library</extensionDescription>
<status>1</status>
</extension>
</php>