Commit a6df2bbc authored by Florian Schaal's avatar Florian Schaal

add option to set additional php-versions active/inactive

parent 652ec7d3
ALTER TABLE `web_domain` ADD COLUMN `ssl_letsencrypt_exclude` enum('n','y') NOT NULL DEFAULT 'n' AFTER `ssl_letsencrypt`;
ALTER TABLE `remote_user` ADD `remote_access` ENUM('y','n') NOT NULL DEFAULT 'y' AFTER `remote_password`;
ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`;
ALTER TABLE `server_php` ADD `active` enum('y','n') NOT NULL DEFAULT 'y' AFTER `php_fpm_pool_dir`;
......@@ -1346,6 +1346,7 @@ CREATE TABLE `server_php` (
`php_fpm_init_script` varchar(255) DEFAULT NULL,
`php_fpm_ini_dir` varchar(255) DEFAULT NULL,
`php_fpm_pool_dir` varchar(255) DEFAULT NULL,
`active` enum('n','y') NOT NULL DEFAULT 'y',
PRIMARY KEY (`server_php_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......
......@@ -124,6 +124,13 @@ $form["tabs"]['php_name'] = array (
'width' => '40',
'maxlength' => '255'
),
'active' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
//#################################
// ENDE Datenbankfelder
//#################################
......
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Caminho do diretório do php.ini';
$wb['php_fpm_init_script_txt'] = 'Caminho do script de inicialização do PHP-FPM';
$wb['php_fpm_ini_dir_txt'] = 'Caminho do diretório do php.ini';
$wb['php_fpm_pool_dir_txt'] = 'Caminho do diretório de faixas (pool) do PHP-FPM';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Cesta k php.ini adresáři';
$wb['php_fpm_init_script_txt'] = 'Cesta k PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Cesta k php.ini adresáři';
$wb['php_fpm_pool_dir_txt'] = 'Cesta k PHP-FPM pool adresáři';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Pfad zum php.ini Verzeichnis';
$wb['php_fpm_init_script_txt'] = 'Pfad zum PHP-FPM Init Script';
$wb['php_fpm_ini_dir_txt'] = 'Pfad zum php.ini Verzeichnis';
$wb['php_fpm_pool_dir_txt'] = 'Pfad zum PHP-FPM Pool Verzeichnis';
$wb['active_txt'] = 'Aktiv';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Sti til php.ini mappe';
$wb['php_fpm_init_script_txt'] = 'Sti til PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Sti til php.ini mappe';
$wb['php_fpm_pool_dir_txt'] = 'Sti til PHP-FPM pool mappe';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fpm_init_script_txt'] = 'Ruta al archivo de arranque de PHP-FPM';
$wb['php_fpm_pool_dir_txt'] = 'Ruta al directorio de procesos de PHP-FPM';
$wb['server_id_txt'] = 'Servidor';
$wb['server_php_name_error_empty'] = 'El campo Nombre no puede estar vacío.';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Putanja do php.ini direktorija';
$wb['php_fpm_init_script_txt'] = 'Putanja do PHP-FPM init skripte';
$wb['php_fpm_ini_dir_txt'] = 'Putanja do php.ini direktorija';
$wb['php_fpm_pool_dir_txt'] = 'Putanja do PHP-FPM pool direktorija';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Percorso per php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Percorso per PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Percorso per php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Percorso per PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Ścieżka do katalogu php.ini';
$wb['php_fpm_init_script_txt'] = 'Ścieżka do skryptu inicjującego PHP-FPM';
$wb['php_fpm_ini_dir_txt'] = 'Ścieżka do katalogu php.ini';
$wb['php_fpm_pool_dir_txt'] = 'Ścieżka do katalogu pool PHP-FPM';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Путь к каталогу php.ini FastCGI';
$wb['php_fpm_init_script_txt'] = 'Путь к скрипту нициализации PHP-FPM';
$wb['php_fpm_ini_dir_txt'] = 'Путь к каталогу php.ini PHP-FPM';
$wb['php_fpm_pool_dir_txt'] = 'Путь до каталога пула PHP-FPM';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'php.ini Klasörünün Yolu';
$wb['php_fpm_init_script_txt'] = 'PHP-FPM Başlatma Betiğinin Yolu';
$wb['php_fpm_ini_dir_txt'] = 'php.ini Klasörünün Yolu';
$wb['php_fpm_pool_dir_txt'] = 'PHP-FPM Havuz Klasörünün Yolu';
$wb['active_txt'] = 'Active';
?>
......@@ -20,11 +20,13 @@
<div class="form-group">
<label for="name" class="col-sm-3 control-label">{tmpl_var name='name_txt'}</label>
<div class="col-sm-9"><input type="text" name="name" id="name" value="{tmpl_var name='name'}" class="form-control" /></div></div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='active_txt'}</label>
<div class="col-sm-9">{tmpl_var name='active'}</div></div>
<input type="hidden" name="id" value="{tmpl_var name='id'}">
<div class="clear"><div class="right">
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/server_php_edit.php">{tmpl_var name='btn_save_txt'}</button>
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/server_php_list.php">{tmpl_var name='btn_cancel_txt'}</button>
</div></div>
\ No newline at end of file
</div></div>
......@@ -93,9 +93,9 @@ if($type == 'getphpfastcgi'){
}
if($php_type == 'php-fpm' || ($php_type == 'hhvm' && $server_type == 'nginx')){
$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, $server_id);
$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'".$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 = ?".$sql_where, $server_id);
$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'".$sql_where, $server_id);
}
$php_select = "";
if(is_array($php_records) && !empty($php_records)) {
......
......@@ -244,17 +244,17 @@ class page_action extends tform_actions {
if($this->_vhostdomain_type == 'domain') {
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){
$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=?)", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']);
$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'", ($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=?)", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']);
$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'", ($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')){
$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=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
$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'", $parent_domain['server_id'], $_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=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
$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'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
}
}
$php_select = "<option value=''>Default</option>";
......@@ -388,7 +388,7 @@ class page_action extends tform_actions {
if(!empty($web_config[$server_id]['server_type'])) $server_type = $web_config[$server_id]['server_type'];
if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
$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 = ?)";
$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')){
$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, ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $selected_client['client_id']);
......@@ -398,10 +398,10 @@ class page_action extends tform_actions {
}
} else {
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){
$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=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
$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'", $parent_domain['server_id'], $_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=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
$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'", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']);
}
}
$php_select = "<option value=''>Default</option>";
......@@ -608,7 +608,7 @@ class page_action extends tform_actions {
if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
$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 = ?)";
$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')){
$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, $server_id, $selected_client['client_id']);
......@@ -618,10 +618,10 @@ class page_action extends tform_actions {
}
} else {
if($this->dataRecord['php'] == 'php-fpm' || ($this->dataRecord['php'] == 'hhvm' && $server_type == 'nginx')){
$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 = ?", $parent_domain['server_id']);
$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'", $parent_domain['server_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 = ?", $parent_domain['server_id']);
$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND active = 'y'", $parent_domain['server_id']);
}
}
$php_select = "<option value=''>Default</option>";
......@@ -1339,7 +1339,7 @@ class page_action extends tform_actions {
if(isset($this->dataRecord['fastcgi_php_version']) && $this->dataRecord['fastcgi_php_version'] != '') {
// Check php-fpm mode
if($this->dataRecord['php'] == 'php-fpm'){
$tmp = $app->db->queryOneRecord("SELECT * FROM server_php WHERE CONCAT(name,':',php_fpm_init_script,':',php_fpm_ini_dir,':',php_fpm_pool_dir) = '".$app->db->quote($this->dataRecord['fastcgi_php_version'])."'");
$tmp = $app->db->queryOneRecord("SELECT * FROM server_php WHERE active = 'y' AND CONCAT(name,':',php_fpm_init_script,':',php_fpm_ini_dir,':',php_fpm_pool_dir) = '".$app->db->quote($this->dataRecord['fastcgi_php_version'])."'");
if(is_array($tmp)) {
$this->dataRecord['fastcgi_php_version'] = $tmp['name'].':'.$tmp['php_fpm_init_script'].':'.$tmp['php_fpm_ini_dir'].':'.$tmp['php_fpm_pool_dir'];
} else {
......@@ -1348,7 +1348,7 @@ class page_action extends tform_actions {
unset($tmp);
// Check fast-cgi mode
} elseif($this->dataRecord['php'] == 'fast-cgi') {
$tmp = $app->db->queryOneRecord("SELECT * FROM server_php WHERE CONCAT(name,':',php_fastcgi_binary,':',php_fastcgi_ini_dir) = '".$app->db->quote($this->dataRecord['fastcgi_php_version'])."'");
$tmp = $app->db->queryOneRecord("SELECT * FROM server_php WHERE active = 'y' AND CONCAT(name,':',php_fastcgi_binary,':',php_fastcgi_ini_dir) = '".$app->db->quote($this->dataRecord['fastcgi_php_version'])."'");
if(is_array($tmp)) {
$this->dataRecord['fastcgi_php_version'] = $tmp['name'].':'.$tmp['php_fastcgi_binary'].':'.$tmp['php_fastcgi_ini_dir'];
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment