diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index e0953124e..d526db048 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -188,9 +188,11 @@ class InstallCyberPanel: 'lsphp7?-ldap lsphp7?-mysql lsphp7?-opcache lsphp7?-pspell lsphp7?-recode ' \ 'lsphp7?-sqlite3 lsphp7?-tidy' - res = os.system(command) - if res != 0: - InstallCyberPanel.stdOut("Failed to install PHP on Ubuntu.", 1, 1) + os.system(command) + + command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp80*' + os.system(command) + elif self.distro == centos: command = 'yum -y groupinstall lsphp-all' @@ -232,8 +234,11 @@ class InstallCyberPanel: install.preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + command = 'yum install lsphp80* -y' + subprocess.call(command, shell=True) + if self.distro == cent8: - command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* --exclude lsphp73-pecl-zip -y' + command = 'dnf install lsphp71* lsphp72* lsphp73* lsphp74* lsphp80* --exclude lsphp73-pecl-zip -y' subprocess.call(command, shell=True) def installMySQL(self, mysql): diff --git a/managePHP/php80.xml b/managePHP/php80.xml new file mode 100755 index 000000000..c95d94cee --- /dev/null +++ b/managePHP/php80.xml @@ -0,0 +1,275 @@ + + + php80 + + + lsphp80-debuginfo + Debug information for package lsphp80 + 0 + + + + lsphp80-pecl-igbinary-debuginfo + Debug information for package lsphp80-pecl-igbinary + 0 + + + + lsphp80-pecl-mcrypt-debuginfo + lsphp80 lsphp80-pecl-mcrypt-debuginfo Extension + 0 + + + + lsphp80-bcmath + A extension for PHP applications for using the bcmath library. + 1 + + + + lsphp80-common + Common files for PHP. + 1 + + + + lsphp80-dba + A database abstraction layer extension for PHP applications. + 1 + + + + lsphp80-devel + Files needed for building PHP extensions. + 0 + + + + lsphp80-enchant + Enchant spelling extension for PHP applications. + 1 + + + + lsphp80-gd + A extension for PHP applications for using the gd graphics library. + 1 + + + + lsphp80-gmp + A extension for PHP applications for using the GNU MP library. + 1 + + + + lsphp80-imap + A extension for PHP applications that use IMAP. + 1 + + + + lsphp80-intl + Internationalization extension for PHP applications. + 1 + + + + lsphp80-json + lsphp80 Json PHP Extension + 1 + + + + lsphp80-ldap + A extension for PHP applications that use LDAP. + 1 + + + + lsphp80-mbstring + A extension for PHP applications which need multi-byte string handling. + 1 + + + + lsphp80-mysqlnd + A extension for PHP applications that use MySQL databases. + 1 + + + + lsphp80-odbc + A extension for PHP applications that use ODBC databases. + 1 + + + + lsphp80-opcache + The Zend OPcache. + 1 + + + + lsphp80-pdo + A database access abstraction extension for PHP applications. + 1 + + + + lsphp80-pear + PHP Extension and Application Repository framework. + 1 + + + + lsphp80-pecl-apcu + APC User Cache. + 0 + + + + lsphp80-pecl-apcu-devel + APCu developer files (header). + 0 + + + + lsphp80-pecl-apcu-panel + APCu control panel. + 0 + + + + lsphp80-pecl-igbinary + Replacement for the standard PHP serializer. + 0 + + + + lsphp80-pecl-igbinary-devel + Igbinary developer files (header). + 0 + + + + lsphp80-pecl-mcrypt + lsphp80 lsphp80-pecl-mcrypt Extension. + 0 + + + + lsphp80-pecl-memcache + Extension to work with the Memcached caching daemon. + 0 + + + + lsphp80-pecl-memcached + Extension to work with the Memcached caching daemon. + 0 + + + + lsphp80-pecl-msgpack + API for communicating with MessagePack serialization. + 0 + + + + lsphp80-pecl-msgpack-devel + MessagePack developer files (header). + 0 + + + + lsphp80-pecl-redis + Extension for communicating with the Redis key-value store. + 0 + + + + lsphp80-pgsql + A PostgreSQL database extension for PHP. + 1 + + + + lsphp80-process + extensions for PHP script using system process interfaces. + 1 + + + + lsphp80-pspell + A extension for PHP applications for using pspell interfaces. + 1 + + + + lsphp80-recode + A extension for PHP applications for using the recode library. + 1 + + + + lsphp80-snmp + A extension for PHP applications that query SNMP-managed devices. + 1 + + + + lsphp80-soap + A extension for PHP applications that use the SOAP protocol. + 1 + + + + lsphp80-tidy + Standard PHP extension provides tidy library support. + 1 + + + + lsphp80-xml + A module for PHP applications which use XML. + 1 + + + + lsphp80-xmlrpc + A extension for PHP applications which use the XML-RPC protocol. + 1 + + + + lsphp80-zip + ZIP archive management extension for PHP + 0 + + + + lsphp80-mcrypt + Standard PHP extension provides mcrypt library support. + 1 + + + + lsphp80-dbg + php73-dbg lsphp80-package + 0 + + + + lsphp80-ioncube + ioncube loaders + 0 + + + + lsphp80-pecl-imagick + Extension to create and modify images using ImageMagick + 0 + + + diff --git a/managePHP/phpManager.py b/managePHP/phpManager.py index 4a9fed7e2..c4f1ecae3 100755 --- a/managePHP/phpManager.py +++ b/managePHP/phpManager.py @@ -13,13 +13,13 @@ class PHPManager: def findPHPVersions(): distro = ProcessUtilities.decideDistro() if distro == ProcessUtilities.centos: - return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] elif distro == ProcessUtilities.cent8: - return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.1','PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] elif distro == ProcessUtilities.ubuntu20: - return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] else: - return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4'] + return ['PHP 7.0', 'PHP 7.1', 'PHP 7.2', 'PHP 7.3', 'PHP 7.4', 'PHP 8.0'] @staticmethod def getPHPString(phpVersion): @@ -42,6 +42,8 @@ class PHPManager: php = "73" elif phpVersion == "PHP 7.4": php = "74" + elif phpVersion == "PHP 8.0": + php = "80" return php diff --git a/managePHP/ubuntuphp80.xml b/managePHP/ubuntuphp80.xml new file mode 100755 index 000000000..61ef9d667 --- /dev/null +++ b/managePHP/ubuntuphp80.xml @@ -0,0 +1,125 @@ + + + php80 + + + lsphp80-common + Most of what you need. + 1 + + + + lsphp80-curl + Curl (common web tools) required for PHP + 1 + + + + lsphp80-dbg + Debugging extension + 0 + + + + lsphp80-dev + Development features almost always required. + 1 + + + + lsphp80-imap + Email extensions for PHP. + 1 + + + + lsphp80-intl + Extensions for countries other than the U.S. + 1 + + + + lsphp80-json + PHP extensions for JavaScript Object Notation. + 1 + + + + lsphp80-ldap + PHP extensions for LDAP (directory access protocol) + 1 + + + + lsphp80-modules-source + PHP source modules for virtually everything. Very large. + 0 + + + + lsphp80-mysql + PHP extension for MySQL or MariaDB databases. + 1 + + + + lsphp80-opcache + PHP low-level caching of code. Very important for performance. + 1 + + + + lsphp80-pgsql + A PostgreSQL database extension for PHP. + 0 + + + + lsphp80-pspell + PHP spell checking extensions. + 0 + + + + lsphp80-recode + PHP extension to transform data between different character sets. + 1 + + + + lsphp80-snmp + PHP network management extensions. + 0 + + + + lsphp80-sqlite3 + An extension for PHP applications that use the SQLite v3 features. + 1 + + + + lsphp80-sybase + An extension for PHP applications that use Sybase databases. + 0 + + + + lsphp80-tidy + PHP extensions for manipulating HTML, XHTML and XML documents. + 1 + + + + lsphp80-ioncube + ioncube loaders + 0 + + + + lsphp80-imagick + Extension to create and modify images using ImageMagick + 0 + + + diff --git a/managePHP/views.py b/managePHP/views.py index 8adf0f89d..9f672a3c9 100755 --- a/managePHP/views.py +++ b/managePHP/views.py @@ -1218,6 +1218,34 @@ def installExtensions(request): status=status) phpExtension.save() + try: + newPHP80 = PHP(phpVers="php80") + newPHP80.save() + + php80Path = '' + + if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8: + php80Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'php80.xml') + else: + php80Path = os.path.join('/usr', 'local', 'CyberCP', 'managePHP', 'ubuntuphp80.xml') + + php80 = ElementTree.parse(php80Path) + + php80Extensions = php80.findall('extension') + + for extension in php80Extensions: + extensionName = extension.find('extensionName').text + extensionDescription = extension.find('extensionDescription').text + status = int(extension.find('status').text) + + phpExtension = installedPackages(phpVers=newPHP80, + extensionName=extensionName, + description=extensionDescription, + status=status) + + phpExtension.save() + except: + pass return render(request, 'managePHP/installExtensions.html', {'phps': PHPManager.findPHPVersions()}) except KeyError: diff --git a/plogical/upgrade.py b/plogical/upgrade.py index c329f5438..9ff26da23 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -1923,7 +1923,6 @@ echo $oConfig->Save() ? 'Done' : 'Error'; @staticmethod def installPHP73(): try: - if Upgrade.installedOutput.find('lsphp73') == -1: command = 'yum install -y lsphp73 lsphp73-json lsphp73-xmlrpc lsphp73-xml lsphp73-tidy lsphp73-soap lsphp73-snmp ' \ 'lsphp73-recode lsphp73-pspell lsphp73-process lsphp73-pgsql lsphp73-pear lsphp73-pdo lsphp73-opcache ' \ @@ -1939,6 +1938,10 @@ echo $oConfig->Save() ? 'Done' : 'Error'; Upgrade.executioner(command, 'Install PHP 74, 0') + if Upgrade.installedOutput.find('lsphp80') == -1: + command = 'yum install lsphp80* -y' + subprocess.call(command, shell=True) + except: command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install ' \ 'lsphp7? lsphp7?-common lsphp7?-curl lsphp7?-dev lsphp7?-imap lsphp7?-intl lsphp7?-json ' \ @@ -1946,6 +1949,9 @@ echo $oConfig->Save() ? 'Done' : 'Error'; 'lsphp7?-sqlite3 lsphp7?-tidy' Upgrade.executioner(command, 'Install PHP 73, 0') + command = 'DEBIAN_FRONTEND=noninteractive apt-get -y install lsphp80*' + os.system(command) + CentOSPath = '/etc/redhat-release' if not os.path.exists(CentOSPath):