diff --git a/install/dist/conf/gentoo.conf.php b/install/dist/conf/gentoo.conf.php index 83a487f29097df9d68cbfea369d63ccbcac72fd4..f15eac65d305e95c185e9c317c61c90af99f7fbc 100644 --- a/install/dist/conf/gentoo.conf.php +++ b/install/dist/conf/gentoo.conf.php @@ -72,9 +72,6 @@ $conf['mysql']['master_admin_password'] = ''; $conf['mysql']['master_ispconfig_user'] = ''; $conf['mysql']['master_ispconfig_password'] = md5(uniqid(rand())); -//* SuPHP -$conf['suphp']['config_file'] = '/etc/suphp.conf'; - //* Apache $conf['apache']['installed'] = false; // will be detected automatically during installation $conf['apache']['user'] = 'apache'; diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index f8ca1eb6abe8c233847e25ed153038f922309813..176245cea9034b2924379576d640ecefe901f3d0 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -696,11 +696,6 @@ class installer_dist extends installer_base { global $conf; if($conf['apache']['installed'] == false) return; - if(is_file('/etc/suphp.conf')) { - //replaceLine('/etc/suphp.conf','php=php:/usr/bin','x-httpd-suphp=php:/usr/bin/php-cgi',0); - replaceLine('/etc/suphp.conf', 'docroot=', 'docroot=/var/www', 0); - replaceLine('/etc/suphp.conf', 'umask=0077', 'umask=0022', 0); - } //* Create the logging directory for the vhost logfiles exec('mkdir -p /var/log/ispconfig/httpd'); diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index f0c28a61c27d24f17162e12811cff88d2dab6b62..dad0f880e6906835326abd1b17ea0dd109ae8c6c 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -555,19 +555,6 @@ class installer extends installer_base mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true); } - if (is_file($conf['suphp']['config_file'])) - { - $content = rf($conf['suphp']['config_file']); - - if (!preg_match('|^x-httpd-suphp=php:/usr/bin/php-cgi$|m', $content)) - { - $content = preg_replace('/;Handler for php-scripts/', ";Handler for php-scripts\nx-httpd-suphp=php:/usr/bin/php-cgi", $content); - $content = preg_replace('/;?umask=\d+/', 'umask=0022', $content); - } - - $this->write_config_file($conf['suphp']['config_file'], $content); - } - //* Enable ISPConfig default vhost settings $default_vhost_path = $conf['apache']['vhost_conf_dir'].'/'.$conf['apache']['vhost_default']; if (is_file($default_vhost_path)) diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 32d74a6d1798d593c9a3f8b3c49c014a42beda58..ea862a67e2ecc76ac5fcef73cdce20f1fcc8866b 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -663,13 +663,6 @@ class installer_dist extends installer_base { //* enable apache logio module exec('a2enmod logio'); - //if(is_file('/etc/suphp.conf')) { - replaceLine('/etc/suphp.conf', 'php=php', 'x-httpd-suphp="php:/srv/www/cgi-bin/php5"', 0, 0); - replaceLine('/etc/suphp.conf', 'php="php', 'x-httpd-suphp="php:/srv/www/cgi-bin/php5"', 0, 0); - replaceLine('/etc/suphp.conf', 'docroot=', 'docroot=/srv/www', 0, 0); - replaceLine('/etc/suphp.conf', 'umask=0077', 'umask=0022', 0); - //} - if(!file_exists('/srv/www/cgi-bin/php5') && file_exists('/srv/www/cgi-bin/php')) { symlink('/srv/www/cgi-bin/php', '/srv/www/cgi-bin/php5'); } @@ -1249,9 +1242,6 @@ class installer_dist extends installer_base { } } - - // Fix a setting in vhost master file for suse - replaceLine('/usr/local/ispconfig/server/conf/vhost.conf.master', "suPHP_UserGroup", " suPHP_UserGroup ", 0); } if($conf['nginx']['installed'] == true && $this->install_ispconfig_interface == true){ diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 36b0ed022e9af4e9de757af54a7aeb9daf479a5c..6011a2c4aaee5ccd0eb4d80c9c10c6f110dd23d6 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1938,12 +1938,6 @@ class installer_base { //* Create the logging directory for the vhost logfiles if(!@is_dir($conf['ispconfig_log_dir'].'/httpd')) mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true); - if(is_file('/etc/suphp/suphp.conf')) { - replaceLine('/etc/suphp/suphp.conf', 'php="php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0); - //replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0); - replaceLine('/etc/suphp/suphp.conf', 'umask=00', 'umask=0022', 0); - } - if(is_file('/etc/apache2/sites-enabled/000-default')) { replaceLine('/etc/apache2/sites-available/000-default', 'NameVirtualHost *', 'NameVirtualHost *:80', 1, 0); replaceLine('/etc/apache2/sites-available/000-default', '', '', 1, 0); diff --git a/interface/lib/classes/remote.d/server.inc.php b/interface/lib/classes/remote.d/server.inc.php index a9961784e2f2fc31c1da7eb768439b07574708d1..4e8179d06e7ec26a25de00ca50000ab01f634ef6 100644 --- a/interface/lib/classes/remote.d/server.inc.php +++ b/interface/lib/classes/remote.d/server.inc.php @@ -269,7 +269,7 @@ class remoting_server extends remoting { $web_config[$server_id] = $app->getconf->get_server_config($server_id, 'web'); $server_type = !empty($web_config[$server_id]['server_type']) ? $web_config[$server_id]['server_type'] : 'apache'; - if ($php === 'php-fpm' || ($php === 'hhvm' && $server_type === 'nginx')) { + if ($php === 'php-fpm') { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND (client_id = 0)", $server_id); foreach ($php_records as $php_record) { $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir']; diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index a1a4dfb19a28e1ed7baa2c7724adf1b831e8b128..aa0e1188a15fce6e7397e8a10e626ac1c1068d6b 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1242,7 +1242,7 @@ $form["tabs"]['web'] = array( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => 'fast-cgi', - 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM'), + 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'mod' => 'Mod-PHP', 'php-fpm' => 'PHP-FPM'), 'searchable' => 2 ), 'nginx_cgi_socket' => array( diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 396cbff4ecd66cc093434f4cf8fdec703e4d9b00..09db5c1ff660c9b06bbc2b25b308b23a18d19dc5 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -1100,7 +1100,7 @@ $form["tabs"]['limits'] = array ( 'default' => '', 'separator' => ',', 'valuelimit' => 'client:web_php_options', - 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM') + 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'mod' => 'Mod-PHP', 'php-fpm' => 'PHP-FPM') ), 'limit_cgi' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php index 76cc26c024fb1992a7c268b58dcd74b506bb7c7b..2196ad4d0f7eb3474eca7e81308558a0523d4d57 100644 --- a/interface/web/client/form/client_template.tform.php +++ b/interface/web/client/form/client_template.tform.php @@ -508,7 +508,7 @@ $form["tabs"]['limits'] = array ( 'default' => '', 'separator' => ',', 'valuelimit' => 'client:web_php_options', - 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM') + 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'mod' => 'Mod-PHP', 'php-fpm' => 'PHP-FPM') ), 'limit_cgi' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index bd839da34624064016f9b11a61f1047d4fdc9da8..d5c22e206b84054c93106d1a06c205d6b2c94710 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -1097,7 +1097,7 @@ $form["tabs"]['limits'] = array ( ), 'default' => '', 'separator' => ',', - 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM') + 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'mod' => 'Mod-PHP', 'php-fpm' => 'PHP-FPM') ), 'limit_cgi' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index ff915e7808f5de4fbbc3c25cbcf5a608e50654db..1b67a4ed2df895b713a7f4dca76cf39d9be953f8 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -92,7 +92,7 @@ if($type == 'getphpfastcgi'){ $sql_where .= ")"; } - if($php_type == 'php-fpm' || ($php_type == 'hhvm' && $server_type == 'nginx')){ + if($php_type == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND active = 'y' ORDER BY name".$sql_where, $server_id); } elseif($php_type == 'fast-cgi'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y' ORDER BY name".$sql_where, $server_id); @@ -102,7 +102,7 @@ if($type == 'getphpfastcgi'){ $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { - if($php_type == 'php-fpm' || ($php_type == 'hhvm' && $server_type == 'nginx')){ + if($php_type == 'php-fpm'){ $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir']; } else { $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir']; diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index f47fe709fc6fbaa3d57433517a79516073bac6b0..ad1d4ff55b650e5cc830a000958b2c0de4125c9b 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -251,7 +251,7 @@ $form["tabs"]['domain'] = array ( 'formtype' => 'SELECT', 'default' => 'fast-cgi', 'valuelimit' => 'client:web_php_options', - 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM'), + 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'mod' => 'Mod-PHP', 'php-fpm' => 'PHP-FPM'), 'searchable' => 2 ), 'fastcgi_php_version' => array ( diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 149d4308875af598dfb80c0165a7da816da68da0..6a6dc2d288809179c37b447b608c8aa176fc348a 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -293,31 +293,21 @@ reloadFastcgiPHPVersions(); }); - if(jQuery('#php').val() == 'fast-cgi' || jQuery('#php').val() == 'php-fpm' || (jQuery('#php').val() == 'hhvm' && serverType == 'nginx')){ + if(jQuery('#php').val() == 'fast-cgi' || jQuery('#php').val() == 'php-fpm'){ jQuery('.fastcgi_php_version:hidden').show(); - if(jQuery('#php').val() == 'hhvm'){ - jQuery('#fastcgi_php_version_txt').hide(); - jQuery('#fastcgi_php_fallback_version_txt').show(); - } else { - jQuery('#fastcgi_php_version_txt').show(); - jQuery('#fastcgi_php_fallback_version_txt').hide(); - } - } else { + jQuery('#fastcgi_php_version_txt').show(); + jQuery('#fastcgi_php_fallback_version_txt').hide(); + } else { jQuery('.fastcgi_php_version:visible').hide(); } //ISPConfig.resetFormChanged(); jQuery('#php').change(function(){ reloadFastcgiPHPVersions(); - if(jQuery(this).val() == 'fast-cgi' || jQuery(this).val() == 'php-fpm' || (jQuery(this).val() == 'hhvm' && serverType == 'nginx')){ + if(jQuery(this).val() == 'fast-cgi' || jQuery(this).val() == 'php-fpm'){ jQuery('.fastcgi_php_version:hidden').show(); - if(jQuery(this).val() == 'hhvm'){ - jQuery('#fastcgi_php_version_txt').hide(); - jQuery('#fastcgi_php_fallback_version_txt').show(); - } else { - jQuery('#fastcgi_php_version_txt').show(); - jQuery('#fastcgi_php_fallback_version_txt').hide(); - } + jQuery('#fastcgi_php_version_txt').show(); + jQuery('#fastcgi_php_fallback_version_txt').hide(); } else { jQuery('.fastcgi_php_version:visible').hide(); } @@ -373,21 +363,17 @@ } }); */ - if(selected != "no" && selected != "php-fpm" && selected != "hhvm") { + if(selected != "no" && selected != "php-fpm") { jQuery('#php option[value="php-fpm"]').attr('selected', 'selected').val('php-fpm'); } jQuery('#php option[value="fast-cgi"]').hide(); - jQuery('#php option[value="cgi"]').hide(); jQuery('#php option[value="mod"]').hide(); - jQuery('#php option[value="suphp"]').hide(); } else { serverType = 'apache'; jQuery('.nginx').hide(); jQuery('.apache').show(); jQuery('#php option[value="fast-cgi"]').show(); - jQuery('#php option[value="cgi"]').show(); jQuery('#php option[value="mod"]').show(); - jQuery('#php option[value="suphp"]').show(); } if(noFormChange) { ISPConfig.resetFormChanged(); diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 5d6aed2e4388d4f4d362ec4c88e87e1f8f798b18..d85e5da9a1b0f761f1d0f7f3cd2fc3d1218bfe50 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -243,14 +243,14 @@ class page_action extends tform_actions { if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm'; if($this->_vhostdomain_type == 'domain') { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']); } } else { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi'){ @@ -260,7 +260,7 @@ class page_action extends tform_actions { $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir']; } else { $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir']; @@ -390,14 +390,14 @@ class page_action extends tform_actions { $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $selected_client_group_id); $sql_where = " AND (client_id = 0 OR client_id = ?) AND active = 'y'"; if($this->_vhostdomain_type == 'domain') { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ?".$sql_where." ORDER BY name", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $selected_client['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?".$sql_where." ORDER BY name", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $selected_client['client_id']); } } else { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?) AND active = 'y' ORDER BY name", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { @@ -407,7 +407,7 @@ class page_action extends tform_actions { $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir']; } else { $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir']; @@ -610,14 +610,14 @@ class page_action extends tform_actions { $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $selected_client_group_id); $sql_where = " AND (client_id = 0 OR client_id = ?) AND active = 'y'"; if($this->_vhostdomain_type == 'domain') { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ?".$sql_where." ORDER BY name", $server_id, $selected_client['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?".$sql_where." ORDER BY name", $server_id, $selected_client['client_id']); } } else { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ? AND active = 'y' ORDER BY name", $parent_domain['server_id']); } if($this->dataRecord['php'] == 'fast-cgi') { @@ -627,7 +627,7 @@ class page_action extends tform_actions { $php_select = ""; if(is_array($php_records) && !empty($php_records)) { foreach( $php_records as $php_record) { - if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){ + if($this->dataRecord['php'] == 'php-fpm'){ $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir']; } else { $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir']; diff --git a/interface/web/tools/import_vpopmail.php b/interface/web/tools/import_vpopmail.php index 3e732d3740923cb32457409f9d5260b086ac08a4..d95e405a21b78d8b1c84cb74b5f92539323df689 100644 --- a/interface/web/tools/import_vpopmail.php +++ b/interface/web/tools/import_vpopmail.php @@ -111,7 +111,7 @@ function start_import() { //* add client $sql = "INSERT INTO `client` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `company_name`, `company_id`, `contact_name`, `customer_no`, `vat_id`, `street`, `zip`, `city`, `state`, `country`, `telephone`, `mobile`, `fax`, `email`, `internet`, `icq`, `notes`, `bank_account_owner`, `bank_account_number`, `bank_code`, `bank_name`, `bank_account_iban`, `bank_account_swift`, `default_mailserver`, `limit_maildomain`, `limit_mailbox`, `limit_mailalias`, `limit_mailaliasdomain`, `limit_mailforward`, `limit_mailcatchall`, `limit_mailrouting`, `limit_mailfilter`, `limit_fetchmail`, `limit_mailquota`, `limit_spamfilter_wblist`, `limit_spamfilter_user`, `limit_spamfilter_policy`, `default_webserver`, `limit_web_ip`, `limit_web_domain`, `limit_web_quota`, `web_php_options`, `limit_cgi`, `limit_ssi`, `limit_perl`, `limit_ruby`, `limit_python`, `force_suexec`, `limit_hterror`, `limit_wildcard`, `limit_ssl`, `limit_web_subdomain`, `limit_web_aliasdomain`, `limit_ftp_user`, `limit_shell_user`, `ssh_chroot`, `limit_webdav_user`, `limit_aps`, `default_dnsserver`, `limit_dns_zone`, `limit_dns_slave_zone`, `limit_dns_record`, `default_dbserver`, `limit_database`, `limit_cron`, `limit_cron_type`, `limit_cron_frequency`, `limit_traffic_quota`, `limit_client`, `limit_mailmailinglist`, `limit_openvz_vm`, `limit_openvz_vm_template_id`, `parent_client_id`, `username`, `password`, `language`, `usertheme`, `template_master`, `template_additional`, `created_at`, `id_rsa`, `ssh_rsa`) - VALUES(1, 1, 'riud', 'riud', '', '', '', ?, '', '', '', '', '', '', ?, '', '', '', '', 'http://', '', '', '', '', '', '', '', '', 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, 0, 0, 1, NULL, -1, -1, 'no,fast-cgi,cgi,mod,suphp', 'n', 'n', 'n', 'n', 'n', 'y', 'n', 'n', 'n', -1, -1, -1, 0, 'no,jailkit', 0, 0, 1, -1, -1, -1, 1, -1, 0, 'url', 5, -1, 0, -1, 0, 0, 0, ?, ?, ?, 'default', 0, '', NOW(), '', '')"; + VALUES(1, 1, 'riud', 'riud', '', '', '', ?, '', '', '', '', '', '', ?, '', '', '', '', 'http://', '', '', '', '', '', '', '', '', 1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, 0, 0, 0, 1, NULL, -1, -1, 'no,fast-cgi,mod', 'n', 'n', 'n', 'n', 'n', 'y', 'n', 'n', 'n', -1, -1, -1, 0, 'no,jailkit', 0, 0, 1, -1, -1, -1, 1, -1, 0, 'url', 5, -1, 0, -1, 0, 0, 0, ?, ?, ?, 'default', 0, '', NOW(), '', '')"; $app->db->query($sql, $pw_domain,$country, $pw_domain, $pw_crypt_password, $conf['language']); $client_id = $app->db->insertID(); diff --git a/remoting_client/examples/client_add.php b/remoting_client/examples/client_add.php index 6d5b5934d76cfc827e6c209b708ffe09106061ca..c4d993bb2e0ae785449a7bdd3c2a82c3690515a3 100644 --- a/remoting_client/examples/client_add.php +++ b/remoting_client/examples/client_add.php @@ -51,7 +51,7 @@ try { 'limit_web_ip' => '', 'limit_web_domain' => -1, 'limit_web_quota' => -1, - 'web_php_options' => 'no,fast-cgi,cgi,mod,suphp', + 'web_php_options' => 'no,fast-cgi,mod', 'limit_web_subdomain' => -1, 'limit_web_aliasdomain' => -1, 'limit_ftp_user' => -1, diff --git a/server/conf/hhvm_monit.master b/server/conf/hhvm_monit.master deleted file mode 100644 index 79697eae5874d6fcac9d8143dfea1e11eece10de..0000000000000000000000000000000000000000 --- a/server/conf/hhvm_monit.master +++ /dev/null @@ -1,3 +0,0 @@ -check process hhvm_{SYSTEM_USER} with pidfile /var/run/hhvm/hhvm_{SYSTEM_USER}.pid - start program = "/etc/init.d/hhvm_{SYSTEM_USER} restart" - stop program = "/etc/init.d/hhvm_{SYSTEM_USER} stop" \ No newline at end of file diff --git a/server/conf/hhvm_starter.master b/server/conf/hhvm_starter.master deleted file mode 100644 index e530a405a3a33ef667995fea22e0beead0691923..0000000000000000000000000000000000000000 --- a/server/conf/hhvm_starter.master +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash -# -# /etc/init.d/hhvm_{SYSTEM_USER} -# -### BEGIN INIT INFO -# Provides: hhvm_{SYSTEM_USER} -# Required-Start: $remote_fs $network -# Required-Stop: $remote_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Description: Starts The HHVM FastCGI Daemon -### END INIT INFO -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="HHVM FastCGI Daemon" -NAME=hhvm - -do_start() -{ - if [ ! -d /var/run/hhvm ]; then - mkdir -p -m1777 /var/run/hhvm - else - chmod 1777 /var/run/hhvm - fi - - if [[ -e "/var/run/hhvm/hhvm_{SYSTEM_USER}.pid" ]] ; then - kill -0 `cat /var/run/hhvm/hhvm_{SYSTEM_USER}.pid` >/dev/null 2>&1 ; - case "$?" in - 0) - return 1 - ;; - esac - fi - - if [[ -S /var/run/mysqld/mysqld.sock && ! -S /tmp/mysql.sock ]] ; then - ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock ; - fi - - umask 027 - sudo -u {SYSTEM_USER} touch /var/run/hhvm/hhvm_{SYSTEM_USER}.pid - - BASEINIFILE="" - if [[ -e "/etc/hhvm/php.ini" ]] ; then - BASEINIFILE="--config /etc/hhvm/php.ini" ; - fi - - INIFILE="" - if [[ -e "/var/www/conf/{SYSTEM_USER}/php.ini" ]] ; then - INIFILE="--config /var/www/conf/{SYSTEM_USER}/php.ini" ; - elif [[ -e "/etc/php5/hhvm/php.ini" ]] ; then - INIFILE="--config /etc/php5/hhvm/php.ini" ; - elif [[ -e "/etc/php5/fpm/php.ini" ]] ; then - INIFILE="--config /etc/php5/fpm/php.ini" ; - elif [[ -e "/etc/php5/cgi/php.ini" ]] ; then - INIFILE="--config /etc/php5/cgi/php.ini" ; - fi - - CUSTOMINIFILE="" - if [[ -e "/etc/hhvm/{SYSTEM_USER}.ini" ]] ; then - CUSTOMINIFILE="--config /etc/hhvm/{SYSTEM_USER}.ini" ; - fi - - /usr/bin/hhvm --mode daemon -vServer.Type=fastcgi -vEval.PerfPidMap=false --user {SYSTEM_USER} -vServer.FileSocket=/var/run/hhvm/hhvm.{SYSTEM_USER}.sock -vLog.Level=Warning -vLog.UseLogFile=false -vRepo.Central.Path=/var/run/hhvm/hhvm.{SYSTEM_USER}.hhbc -vServer.FixPathInfo=true $BASEINIFILE $INIFILE $CUSTOMINIFILE -vPidFile=/var/run/hhvm/hhvm_{SYSTEM_USER}.pid & echo $! > /var/run/hhvm/hhvm_{SYSTEM_USER}.pid -} - -do_stop() -{ - if [[ -e "/var/run/hhvm/hhvm_{SYSTEM_USER}.pid" ]] ; then - kill -SIGTERM `cat /var/run/hhvm/hhvm_{SYSTEM_USER}.pid` >/dev/null 2>&1 ; - fi - rm -f /var/run/hhvm/hhvm.{SYSTEM_USER}.sock /var/run/hhvm/hhvm.{SYSTEM_USER}.hhbc /var/run/hhvm/hhvm_{SYSTEM_USER}.pid -} - -case "$1" in - start) - do_start - ;; - stop) - do_stop - ;; - restart|force-reload) - do_stop - case "$?" in - 0|1) - do_start - ;; - *) - ;; - esac - ;; - *) - exit 3 - ;; -esac - -: diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 6b4e88aaeb901648eac8ab632f83b52a0f90b187..c072d0ae3359fb4e4b91cedc33d311a931be4c8c 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -201,44 +201,9 @@ server { fastcgi_intercept_errors on; } - - location @php { - try_files $uri =404; - include /etc/nginx/fastcgi_params; - fastcgi_pass unix:/var/run/hhvm/hhvm..sock; - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - #fastcgi_param PATH_INFO $fastcgi_script_name; - - fastcgi_param SERVER_NAME ; - - fastcgi_intercept_errors on; - error_page 500 501 502 503 = @phpfallback; - } - - location @phpfallback { - try_files $uri =404; - include /etc/nginx/fastcgi_params; - - fastcgi_pass 127.0.0.1:; - - - fastcgi_pass unix:; - - fastcgi_index index.php; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - #fastcgi_param PATH_INFO $fastcgi_script_name; - - fastcgi_param SERVER_NAME ; - - fastcgi_intercept_errors on; - } - - location @php { deny all; } - diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 62b629045c8b236aedf79136c7fa511fc56b15e3..52b0dc37204d9a5c0714c29eeb7e13636ffaab70 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -19,22 +19,10 @@ - - DocumentRoot + +DocumentRoot - - DocumentRoot - - - DocumentRoot - - - DocumentRoot - - DocumentRoot - - - +DocumentRoot ServerName @@ -253,45 +241,6 @@ php_admin_value open_basedir - - # suphp enabled - - - suPHP_Engine on - # suPHP_UserGroup - - suPHP_ConfigPath - - - SetHandler x-httpd-suphp - - suPHP_AddHandler x-httpd-suphp - - - - - # php as cgi enabled - ScriptAlias /php-cgi - Action php-cgi /php-cgi - - - SetHandler php-cgi - - - - - SetHandler php-cgi - - - - - Require all granted - - Order allow,deny - Allow from all - - - # php as fast-cgi enabled # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html @@ -426,64 +375,6 @@ - - - - - Require all granted - - Order allow,deny - Allow from all - - - - - SetHandler hhvm-fcgi - - - SetHandler hhvm-fcgi - - - - - SetHandler hhvm-fcgi - - - SetHandler hhvm-fcgi - - - Action hhvm-fcgi /hhvm-fcgi virtual - Alias /hhvm-fcgi {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} - FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm..sock -pass-header Authorization -pass-header Content-Type - - - - - Require all granted - - Order allow,deny - Allow from all - - - - - SetHandler "proxy:unix:/var/run/hhvm/hhvm..sock|fcgi://localhost" - - - SetHandler "proxy:unix:/var/run/hhvm/hhvm..sock|fcgi://localhost" - - - - - SetHandler "proxy:unix:/var/run/hhvm/hhvm..sock|fcgi://localhost" - - - SetHandler "proxy:unix:/var/run/hhvm/hhvm..sock|fcgi://localhost" - - - - - RewriteEngine on diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index bb4d7fdd75de03cfc3ac6f52271ce0f6d748e399..5be47d050dc0573c0b3fc3a6e8f34ddeaa2d71ef 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -159,7 +159,7 @@ class apache2_plugin { /* $data contains an array with these keys: * file -> full path of changed php_ini - * mode -> web_domain php modes to change (mod, fast-cgi, php-fpm, hhvm or '' for all except 'mod') + * mode -> web_domain php modes to change (mod, fast-cgi, php-fpm or '' for all except 'mod') * php_version -> php ini path that changed (additional php versions) */ @@ -179,12 +179,6 @@ class apache2_plugin { $qrystr .= " AND fastcgi_php_version LIKE ?"; $param = '%:' . $data['php_version'] . ':%'; } - } elseif($data['mode'] == 'hhvm') { - $qrystr .= " AND php = 'hhvm'"; - if($data['php_version']) { - $qrystr .= " AND fastcgi_php_version LIKE ?"; - $param = '%:' . $data['php_version'] . ':%'; - } } else { $qrystr .= " AND php != 'mod' AND php != 'fast-cgi'"; } @@ -1099,11 +1093,6 @@ class apache2_plugin { if($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') $custom_php_ini_dir .= '_' . $web_folder; if(!is_dir($web_config['website_basedir'].'/conf')) $app->system->mkdir($web_config['website_basedir'].'/conf'); - //* add open_basedir restriction to custom php.ini content, required for suphp only - if(!stristr($data['new']['custom_php_ini'], 'open_basedir') && $data['new']['php'] == 'suphp') { - $data['new']['custom_php_ini'] .= "\nopen_basedir = '".$data['new']['php_open_basedir']."'\n"; - } - $fastcgi_config = $app->getconf->get_server_config($conf['server_id'], 'fastcgi'); if(trim($data['new']['fastcgi_php_version']) != ''){ @@ -1550,7 +1539,7 @@ class apache2_plugin { $default_php_fpm = true; } } else { - if(trim($data['old']['fastcgi_php_version']) != '' && ($data['old']['php'] == 'php-fpm' || $data['old']['php'] == 'hhvm')){ + if(trim($data['old']['fastcgi_php_version']) != '' && $data['old']['php'] == 'php-fpm'){ $default_php_fpm = false; list($custom_php_fpm_name, $custom_php_fpm_init_script, $custom_php_fpm_ini_dir, $custom_php_fpm_pool_dir) = explode(':', trim($data['old']['fastcgi_php_version'])); if(substr($custom_php_fpm_ini_dir, -1) != '/') $custom_php_fpm_ini_dir .= '/'; @@ -1823,7 +1812,6 @@ class apache2_plugin { } $this->php_fpm_pool_update($data, $web_config, $pool_dir, $pool_name, $socket_dir); - $this->hhvm_update($data, $web_config); if($web_config['check_apache_config'] == 'y') { //* Test if apache starts with the new configuration file @@ -2143,8 +2131,6 @@ class apache2_plugin { // remove PHP-FPM pool if ($data['old']['php'] == 'php-fpm') { $this->php_fpm_pool_delete($data, $web_config); - } elseif($data['old']['php'] == 'hhvm') { - $this->hhvm_update($data, $web_config); } //remove the php cgi starter script if available @@ -2895,84 +2881,6 @@ class apache2_plugin { } } - private function hhvm_update($data, $web_config) { - global $app, $conf; - - if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_starter.master')) { - $content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_starter.master'); - } else { - $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); - } - if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_monit.master')) { - $monit_content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_monit.master'); - } else { - $monit_content = file_get_contents($conf['rootpath'] . '/conf/hhvm_monit.master'); - } - - if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || ($data['new']['php'] == 'hhvm' && isset($data['old']['custom_php_ini']) && $data['new']['custom_php_ini'] != $data['old']['custom_php_ini'])) { - - // Custom php.ini settings - $custom_php_ini_settings = trim($data['new']['custom_php_ini']); - if(intval($data['new']['directive_snippets_id']) > 0){ - $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); - if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ - $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); - if(is_array($required_php_snippets) && !empty($required_php_snippets)){ - foreach($required_php_snippets as $required_php_snippet){ - $required_php_snippet = intval($required_php_snippet); - if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); - $php_snippet['snippet'] = trim($php_snippet['snippet']); - if($php_snippet['snippet'] != ''){ - $custom_php_ini_settings .= "\n".$php_snippet['snippet']; - } - } - } - } - } - } - if($custom_php_ini_settings != ''){ - // Make sure we only have Unix linebreaks - $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); - $custom_php_ini_settings = str_replace("\r", "\n", $custom_php_ini_settings); - if(@is_dir('/etc/hhvm')) file_put_contents('/etc/hhvm/'.$data['new']['system_user'].'.ini', $custom_php_ini_settings); - } else { - if($data['old']['system_user'] != '' && is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); - } - - $content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $content); - file_put_contents('/etc/init.d/hhvm_' . $data['new']['system_user'], $content); - exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); - exec('/usr/sbin/update-rc.d hhvm_' . $data['new']['system_user'] . ' defaults >/dev/null 2>&1'); - exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' restart >/dev/null 2>&1'); - - if(is_dir('/etc/monit/conf.d')){ - $monit_content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $monit_content); - file_put_contents('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'], $monit_content); - if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])) unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']); - exec('/etc/init.d/monit restart >/dev/null 2>&1'); - } - - } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { - if($data['old']['system_user'] != ''){ - exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); - exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); - unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); - if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); - } - - if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){ - if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user'])){ - unlink('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']); - } - if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){ - unlink('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user']); - } - exec('/etc/init.d/monit restart >/dev/null 2>&1'); - } - } - } - //* Update the PHP-FPM pool configuration file private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $socket_dir) { global $app, $conf; diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index c1c71ac61583fc25a457e8637274317dcb9efd35..5024a3bffde70f880545ab7f68af37350cc3a324 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1003,7 +1003,7 @@ class nginx_plugin { $default_php_fpm = true; } */ - if($data['new']['php'] == 'php-fpm' || $data['new']['php'] == 'hhvm'){ + if($data['new']['php'] == 'php-fpm'){ if(trim($data['new']['fastcgi_php_version']) != ''){ $default_php_fpm = false; list($custom_php_fpm_name, $custom_php_fpm_init_script, $custom_php_fpm_ini_dir, $custom_php_fpm_pool_dir) = explode(':', trim($data['new']['fastcgi_php_version'])); @@ -1897,7 +1897,6 @@ class nginx_plugin { } $this->php_fpm_pool_update($data, $web_config, $pool_dir, $pool_name, $socket_dir); - $this->hhvm_update($data, $web_config); if($web_config['check_apache_config'] == 'y') { //* Test if nginx starts with the new configuration file @@ -2219,9 +2218,6 @@ class nginx_plugin { // remove PHP-FPM pool if ($data['old']['php'] == 'php-fpm') { $this->php_fpm_pool_delete($data, $web_config); - } elseif($data['old']['php'] == 'hhvm') { - $this->hhvm_update($data, $web_config); - $this->php_fpm_pool_delete($data, $web_config); } //remove the php cgi starter script if available @@ -2577,92 +2573,13 @@ class nginx_plugin { } } - private function hhvm_update($data, $web_config) { - global $app, $conf; - - if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_starter.master')) { - $content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_starter.master'); - } else { - $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); - } - if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_monit.master')) { - $monit_content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_monit.master'); - } else { - $monit_content = file_get_contents($conf['rootpath'] . '/conf/hhvm_monit.master'); - } - - if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || ($data['new']['php'] == 'hhvm' && isset($data['old']['custom_php_ini']) && isset($data['new']['custom_php_ini']) && $data['new']['custom_php_ini'] != $data['old']['custom_php_ini'])) { - - // Custom php.ini settings - $custom_php_ini_settings = trim($data['new']['custom_php_ini']); - if(intval($data['new']['directive_snippets_id']) > 0){ - $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); - if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ - $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); - if(is_array($required_php_snippets) && !empty($required_php_snippets)){ - foreach($required_php_snippets as $required_php_snippet){ - $required_php_snippet = intval($required_php_snippet); - if($required_php_snippet > 0){ - $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE ".($snippet['master_directive_snippets_id'] > 0 ? 'master_' : '')."directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); - $php_snippet['snippet'] = trim($php_snippet['snippet']); - if($php_snippet['snippet'] != ''){ - $custom_php_ini_settings .= "\n".$php_snippet['snippet']; - } - } - } - } - } - } - if($custom_php_ini_settings != ''){ - // Make sure we only have Unix linebreaks - $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); - $custom_php_ini_settings = str_replace("\r", "\n", $custom_php_ini_settings); - if(@is_dir('/etc/hhvm')) file_put_contents('/etc/hhvm/'.$data['new']['system_user'].'.ini', $custom_php_ini_settings); - } else { - if($data['old']['system_user'] != '' && is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); - } - - $content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $content); - file_put_contents('/etc/init.d/hhvm_' . $data['new']['system_user'], $content); - exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); - exec('/usr/sbin/update-rc.d hhvm_' . $data['new']['system_user'] . ' defaults >/dev/null 2>&1'); - exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' restart >/dev/null 2>&1'); - - if(is_dir('/etc/monit/conf.d')){ - $monit_content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $monit_content); - file_put_contents('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'], $monit_content); - if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])) unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']); - exec('/etc/init.d/monit restart >/dev/null 2>&1'); - } - - } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { - if($data['old']['system_user'] != ''){ - exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); - exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); - unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); - if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); - } - - if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){ - if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user'])){ - unlink('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']); - } - if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){ - unlink('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user']); - } - exec('/etc/init.d/monit restart >/dev/null 2>&1'); - } - } - } - //* Update the PHP-FPM pool configuration file private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $socket_dir) { global $app, $conf; $pool_dir = trim($pool_dir); $rh_releasefiles = array('/etc/centos-release', '/etc/redhat-release'); - // HHVM => PHP-FPM-Fallback - if($data['new']['php'] == 'php-fpm' || $data['new']['php'] == 'hhvm'){ + if($data['new']['php'] == 'php-fpm'){ if(trim($data['new']['fastcgi_php_version']) != ''){ $default_php_fpm = false; list($custom_php_fpm_name, $custom_php_fpm_init_script, $custom_php_fpm_ini_dir, $custom_php_fpm_pool_dir) = explode(':', trim($data['new']['fastcgi_php_version'])); @@ -2683,8 +2600,7 @@ class nginx_plugin { $app->uses("getconf"); $web_config = $app->getconf->get_server_config($conf["server_id"], 'web'); - // HHVM => PHP-FPM-Fallback - if($data['new']['php'] != 'php-fpm' && $data['new']['php'] != 'hhvm'){ + if($data['new']['php'] != 'php-fpm'){ if(@is_file($pool_dir.$pool_name.'.conf')){ $app->system->unlink($pool_dir.$pool_name.'.conf'); //$reload = true; diff --git a/server/plugins-available/pma_symlink_plugin.inc.php b/server/plugins-available/pma_symlink_plugin.inc.php index 6b9b4fb2642f4b65dad4c511a851c5e6dc5ab857..88c68da83cef9b514a2721193c80e7d2e4896840 100644 --- a/server/plugins-available/pma_symlink_plugin.inc.php +++ b/server/plugins-available/pma_symlink_plugin.inc.php @@ -101,9 +101,7 @@ class pma_symlink_plugin { } $symlink = true; - if($data["new"]["php"] == "suphp") $symlink = false; - elseif($data["new"]["php"] == "cgi" && $data["new"]["suexec"] == "y") $symlink = false; - elseif($data["new"]["php"] == "fast-cgi" && $data["new"]["suexec"] == "y") $symlink = false; + if($data["new"]["php"] == "fast-cgi" && $data["new"]["suexec"] == "y") $symlink = false; if(!is_dir($data["new"]["document_root"]."/web")) mkdir($data["new"]["document_root"].'/web', 0755, true); diff --git a/server/plugins-available/webmail_symlink_plugin.inc.php b/server/plugins-available/webmail_symlink_plugin.inc.php index c64b706d7e4361d42919246c8e8804426ea2def9..9edce913dfd6081f1c7ed0e01050452f05c61c42 100644 --- a/server/plugins-available/webmail_symlink_plugin.inc.php +++ b/server/plugins-available/webmail_symlink_plugin.inc.php @@ -101,9 +101,7 @@ class webmail_symlink_plugin { } $symlink = true; - if($data["new"]["php"] == "suphp") $symlink = false; - elseif($data["new"]["php"] == "cgi" && $data["new"]["suexec"] == "y") $symlink = false; - elseif($data["new"]["php"] == "fast-cgi" && $data["new"]["suexec"] == "y") $symlink = false; + if($data["new"]["php"] == "fast-cgi" && $data["new"]["suexec"] == "y") $symlink = false; if(!is_dir($data["new"]["document_root"]."/web")) mkdir($data["new"]["document_root"].'/web', 0755, true);