tbrehm
2010-03-21 11bbe76529df1836db3b31da3ed55cb7800e06f8
Merged revisions 1647 - 1662 from trunk.
34 files modified
129 ■■■■■ changed files
docs/INSTALL_DEBIAN_5.0_multiserver.txt 5 ●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 2 ●●● patch | view | raw | blame | history
install/tpl/config.inc.php.master 2 ●●● patch | view | raw | blame | history
install/tpl/mydns.conf.master 4 ●●●● patch | view | raw | blame | history
install/update.php 2 ●●● patch | view | raw | blame | history
interface/web/client/client_template_del.php 11 ●●●●● patch | view | raw | blame | history
interface/web/client/form/client.tform.php 13 ●●●●● patch | view | raw | blame | history
interface/web/client/lib/lang/en_client_template.lng 1 ●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_user_filter.tform.php 4 ●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/bg_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/br_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/de_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/en_mail_user_filter.lng 4 ●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/es_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/fi_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/fr_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/hu_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/it_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/ja_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/nl_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/pl_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/ro_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/se_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/sk_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/tr_mail_user_filter.lng 2 ●●● patch | view | raw | blame | history
interface/web/mail/mail_user_edit.php 3 ●●●● patch | view | raw | blame | history
interface/web/mail/mail_user_stats.php 8 ●●●● patch | view | raw | blame | history
interface/web/mail/templates/mail_user_stats_list.htm 8 ●●●● patch | view | raw | blame | history
interface/web/monitor/show_sys_state.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_domain.lng 1 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_domain_edit.htm 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_domain_edit.php 5 ●●●● patch | view | raw | blame | history
server/conf/vhost.conf.master 8 ●●●● patch | view | raw | blame | history
server/cron_daily.php 14 ●●●● patch | view | raw | blame | history
docs/INSTALL_DEBIAN_5.0_multiserver.txt
@@ -1,4 +1,7 @@
This guide is incomplete. Work in progress.
Installing the webserver
--------------------------------------------------
@@ -21,7 +24,7 @@
apt-get install gcc make
apt-get install postfix
install/sql/ispconfig3.sql
@@ -1241,7 +1241,7 @@
-- Dumping data for table `sys_config`
--
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.2');
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.2.1');
-- --------------------------------------------------------
install/tpl/config.inc.php.master
@@ -57,7 +57,7 @@
//** Application
define('ISPC_APP_TITLE', 'ISPConfig');
define('ISPC_APP_VERSION', '3.0.2');
define('ISPC_APP_VERSION', '3.0.2.1');
//** Database
install/tpl/mydns.conf.master
@@ -49,7 +49,7 @@
ignore-minimum = no     # Ignore minimum TTL for zone?
soa-table = dns_soa     # Name of table containing SOA records
rr-table = dns_rr       # Name of table containing RR data
soa-where = server_id = {server_id}               # Extra WHERE clause for SOA queries
rr-where =  server_id = {server_id}               # Extra WHERE clause for RR queries
## soa-where = server_id = {server_id}               # Extra WHERE clause for SOA queries
## rr-where =  server_id = {server_id}               # Extra WHERE clause for RR queries
use-soa-active = yes # To fix bug 295 where active or inactive status is ignored.
use-rr-active = yes# To fix bug 295 where active or inactive status is ignored.
install/update.php
@@ -149,7 +149,7 @@
    system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
}
if(filesize('existing_db.sql') < 60000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
// create a backup copy of the ispconfig database in the root folder
$backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql';
interface/web/client/client_template_del.php
@@ -44,12 +44,21 @@
//* Check permissions for module
$app->auth->check_module_permissions('client');
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are for Admins only.');
$app->uses('tpl,tform');
$app->load('tform_actions');
class page_action extends tform_actions {
    function onBeforeDelete() {
        global $app;
        $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'");
        if($rec['number'] > 0) {
            $app->error($app->tform->lng('template_del_aborted_txt'));
        }
    }
}
$page = new page_action;
interface/web/client/form/client.tform.php
@@ -62,6 +62,17 @@
    }
}
//* Load themes
$themes_list = array();
$handle = @opendir(ISPC_THEMES_PATH);
while ($file = @readdir ($handle)) {
    if (substr($file, 0, 1) != '.') {
        if(@is_dir(ISPC_THEMES_PATH."/$file")) {
            $themes_list[$file] = $file;
        }
    }
}
$form["tabs"]['address'] = array (
    'title'     => "Address",
    'width'     => 100,
@@ -143,7 +154,7 @@
            'datatype'    => 'VARCHAR',
            'formtype'    => 'SELECT',
            'default'    => 'default',
            'value'        => array('default' => 'default'),
            'value'        => $themes_list,
            'separator'    => '',
            'width'        => '30',
            'maxlength'    => '255',
interface/web/client/lib/lang/en_client_template.lng
@@ -57,4 +57,5 @@
$wb["limit_web_quota_txt"] = 'Web Quota';
$wb["limit_traffic_quota_txt"] = 'Traffic Quota';
$wb["limit_trafficquota_error_notint"] = 'Traffic Quota must be a number.';
$wb["template_del_aborted_txt"] = 'Delete aborted. There is still a client which has this template selected.';
?>
interface/web/mail/form/mail_user_filter.tform.php
@@ -110,7 +110,7 @@
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[a-zA-Z0-9\.\-\_]{0,100}$/',
                                                        'regex' => '/^[a-zA-Z0-9\.\-\_\ ]{0,100}$/',
                                                        'errmsg'=> 'target_error_regex'),
                                    ),
            'default'    => '',
@@ -132,4 +132,4 @@
?>
?>
interface/web/mail/lib/lang/bg_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Name is empty.';
$wb['searchterm_is_empty'] = 'Search term is empty.';
$wb['source_txt'] = 'Source';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/br_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Nome está em branco.';
$wb['searchterm_is_empty'] = 'Termo de busca em branco.';
$wb['source_txt'] = 'Origem';
$wb['target_error_regex'] = 'O alvo só pode conter os caracteres: a-z, 0-9, -, . e _';
$wb['target_error_regex'] = 'O alvo só pode conter os caracteres: a-z, 0-9, -, ., _, e {espaço}';
?>
interface/web/mail/lib/lang/de_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Name ist leer.';
$wb['searchterm_is_empty'] = 'Suchbegriff ist leer.';
$wb['source_txt'] = 'Quelle';
$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, . und _';
$wb['target_error_regex'] = 'Das Ziel beinhaltet wahrscheinlich diese Zeichen: a-z, 0-9, -, ., _, und {raum}';
?>
interface/web/mail/lib/lang/en_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb["rulename_error_empty"] = 'Name is empty.';
$wb["searchterm_is_empty"] = 'Search term is empty.';
$wb["source_txt"] = 'Source';
$wb["target_error_regex"] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
?>
$wb["target_error_regex"] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/es_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'El nombre está vacío.';
$wb['searchterm_is_empty'] = 'El término de búsqueda está vacío.';
$wb['source_txt'] = 'Origen';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/fi_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Säännön nimi on tyhjä.';
$wb['searchterm_is_empty'] = 'Hakusana on tyhjä.';
$wb['source_txt'] = 'Lähde';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/fr_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Le nom est vide.';
$wb['searchterm_is_empty'] = 'Le terme recherché est vide.';
$wb['source_txt'] = 'Source';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/hu_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'A név üres';
$wb['searchterm_is_empty'] = 'Keresési feltétel üres';
$wb['source_txt'] = 'Forrás';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/it_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Name is empty.';
$wb['searchterm_is_empty'] = 'Search term is empty.';
$wb['source_txt'] = 'Source';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/ja_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Name is empty.';
$wb['searchterm_is_empty'] = 'Search term is empty.';
$wb['source_txt'] = 'Source';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/nl_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Naam is leeg.';
$wb['searchterm_is_empty'] = 'Zoekterm is leeg.';
$wb['source_txt'] = 'Bron';
$wb['target_error_regex'] = 'Het doel mag alleen deze tekens bevatten: a-z, 0-9, -, . en _';
$wb['target_error_regex'] = 'Het doel mag alleen deze tekens bevatten: a-z, 0-9, -, ., _, en {ruimte}';
?>
interface/web/mail/lib/lang/pl_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Nazwa jest pusta.';
$wb['searchterm_is_empty'] = 'Szukany termin jest pusty.';
$wb['source_txt'] = 'Źródło';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/ro_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Nume e gol';
$wb['searchterm_is_empty'] = 'Cautare termeni e gol';
$wb['source_txt'] = 'Sursa';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/se_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Name is empty.';
$wb['searchterm_is_empty'] = 'Search term is empty.';
$wb['source_txt'] = 'Source';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/sk_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'Meno je prázdne';
$wb['searchterm_is_empty'] = 'H?adaný výraz je prázdny.';
$wb['source_txt'] = 'Zdroj';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/lib/lang/tr_mail_user_filter.lng
@@ -6,5 +6,5 @@
$wb['rulename_error_empty'] = 'İsim boş.';
$wb['searchterm_is_empty'] = 'Search term is empty.';
$wb['source_txt'] = 'Kaynak';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, . and _';
$wb['target_error_regex'] = 'The target may only contain these characters: a-z, 0-9, -, ., _, and {space}';
?>
interface/web/mail/mail_user_edit.php
@@ -304,7 +304,8 @@
        }
        
        //** If the email address has been changed, change it in all aliases too
        if($this->oldDataRecord['email'] != $this->dataRecord['email']) {
        if(isset($this->dataRecord['email']) && $this->oldDataRecord['email'] != $this->dataRecord['email']) {
        //if($this->oldDataRecord['email'] != $this->dataRecord['email']) {
            
            //* Update the aliases
            $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = '".$app->db->quote($this->oldDataRecord['email'])."'");
interface/web/mail/mail_user_stats.php
@@ -33,22 +33,22 @@
        //** Traffic of the current month
        $tmp_date = date('Y-m');
        $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ".$rec['mailuser_id']." AND month = '$tmp_date'");
        $rec['this_month'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
        $rec['this_month'] = number_format(intval($tmp_rec['t'])/1024/1024, 0, '.', ' ');
        
        //** Traffic of the current year
        $tmp_date = date('Y');
        $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ".$rec['mailuser_id']." AND month like '$tmp_date%'");
        $rec['this_year'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
        $rec['this_year'] = number_format(intval($tmp_rec['t'])/1024/1024, 0, '.', ' ');
        
        //** Traffic of the last month
        $tmp_date = date('Y-m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
        $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ".$rec['mailuser_id']." AND month = '$tmp_date'");
        $rec['last_month'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
        $rec['last_month'] = number_format(intval($tmp_rec['t'])/1024/1024, 0, '.', ' ');
        
        //** Traffic of the last year
        $tmp_date = date('Y',mktime(0, 0, 0, date("m"), date("d"), date("Y")-1));
        $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ".$rec['mailuser_id']." AND month like '$tmp_date%'");
        $rec['last_year'] = number_format(intval($tmp_rec['t'])/1024, 0, '.', ' ');
        $rec['last_year'] = number_format(intval($tmp_rec['t'])/1024/1024, 0, '.', ' ');
        
        //* The variable "id" contains always the index variable
        $rec['id'] = $rec[$this->idx_key];
interface/web/mail/templates/mail_user_stats_list.htm
@@ -28,10 +28,10 @@
          <tmpl_loop name="records">
          <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
            <td class="tbl_col_email"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="email"}</a></td>
            <td class="tbl_col_this_month"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} kB</a></td>
            <td class="tbl_col_last_month"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_month"} kB</a></td>
            <td class="tbl_col_this_year"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} kB</a></td>
            <td class="tbl_col_last_year"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_year"} kB</a></td>
            <td class="tbl_col_this_month"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_month"} MB</a></td>
            <td class="tbl_col_last_month"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_month"} MB</a></td>
            <td class="tbl_col_this_year"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="this_year"} MB</a></td>
            <td class="tbl_col_last_year"><a href="#" onClick="loadContent('mail/mail_user_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="last_year"} MB</a></td>
            <td class="tbl_col_buttons">
              <div class="buttons icons16">    
              </div>
interface/web/monitor/show_sys_state.php
@@ -203,7 +203,7 @@
/*
 * gets the state from the db and process it
 */
function _processDbState($type, $serverId, &$serverState, &$messages)
function _processDbState($type, $serverId, $serverState, $messages)
{
    global $app;
interface/web/sites/lib/lang/en_web_domain.lng
@@ -57,4 +57,5 @@
$wb["limit_traffic_quota_free_txt"] = 'Max. available Traffic Quota';
$wb["redirect_error_regex"] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
$wb["php_open_basedir_txt"] = 'PHP open_basedir';
$wb["traffic_quota_exceeded_txt"] = 'Traffic quota exceeded';
?>
interface/web/sites/templates/web_domain_edit.htm
@@ -51,7 +51,7 @@
            </div>
      <div class="ctrlHolder">
          <label for="traffic_quota">{tmpl_var name='traffic_quota_txt'}</label>
        <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB
        <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB <tmpl_var name='traffic_quota_exceeded_txt'>
            </div>
      <div class="ctrlHolder">
                <p class="label">{tmpl_var name='cgi_txt'}</p>
interface/web/sites/web_domain_edit.php
@@ -203,6 +203,9 @@
            $app->tpl->setVar("edit_disabled", 0);
        }
        
        $tmp_txt = ($this->dataRecord['traffic_quota_lock'] == 'y')?'<b>('.$app->tform->lng('traffic_quota_exceeded_txt').')</b>':'';
        $app->tpl->setVar("traffic_quota_exceeded_txt", $tmp_txt);
        parent::onShowEnd();
    }
    
@@ -393,7 +396,7 @@
            $client_id = intval($client["client_id"]);
        }
        
        if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) &&  isset($this->dataRecord["client_group_id"]) && $this->dataRecord["client_group_id"] != $this->oldDataRecord["client_group_id"]) {
        if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) &&  isset($this->dataRecord["client_group_id"]) && $this->dataRecord["client_group_id"] != $this->oldDataRecord["sys_groupid"]) {
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote('web'.$this->id);
            $system_group = $app->db->quote('client'.$client_id);
server/conf/vhost.conf.master
@@ -121,10 +121,10 @@
<tmpl_if name='php' op='==' value='fast-cgi'>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
      SocketPath /tmp/fcgid_sock/
      # SocketPath /tmp/fcgid_sock/
      IdleTimeout 3600
      ProcessLifeTime 7200
      MaxProcessCount 1000
      # MaxProcessCount 1000
      DefaultMinClassProcessCount 3
      DefaultMaxClassProcessCount 100
      IPCConnectTimeout 8
@@ -298,10 +298,10 @@
<tmpl_if name='php' op='==' value='fast-cgi'>
    # php as fast-cgi enabled
    <IfModule mod_fcgid.c>
      SocketPath /tmp/fcgid_sock/
      # SocketPath /tmp/fcgid_sock/
      IdleTimeout 3600
      ProcessLifeTime 7200
      MaxProcessCount 1000
      # MaxProcessCount 1000
      DefaultMinClassProcessCount 3
      DefaultMaxClassProcessCount 100
      IPCConnectTimeout 8
server/cron_daily.php
@@ -186,9 +186,9 @@
    foreach($records as $rec){
        $tmp_path = realpath(escapeshellcmd($rec["document_root"].'/tmp'));
        if($tmp_path != '' && strlen($tmp_path) > 10 && is_dir($tmp_path) && $app->system->is_user($rec['system_user'])){
            exec("cd ".$tmp_path."; find -ctime +1 -user ".escapeshellcmd($rec['system_user'])." | grep -v -w .no_delete | xargs rm &> /dev/null");
            if($app->system->is_user('www-data')) exec("cd ".$tmp_path."; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &> /dev/null");
            if($app->system->is_user('wwwrun')) exec("cd ".$tmp_path."; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &> /dev/null");
            exec("cd ".$tmp_path."; find -ctime +1 -user ".escapeshellcmd($rec['system_user'])." | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
            if($app->system->is_user('www-data')) exec("cd ".$tmp_path."; find -ctime +1 -user www-data | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
            if($app->system->is_user('wwwrun')) exec("cd ".$tmp_path."; find -ctime +1 -user wwwrun | grep -v -w .no_delete | xargs rm &> /dev/null 2> /dev/null");
        }
    }
}
@@ -251,7 +251,7 @@
        foreach($records as $rec) {
            
            $web_traffic_quota = $rec['traffic_quota'];
            $domain = $rec['web_domain'];
            $domain = $rec['domain'];
            
            // get the client
            /*
@@ -264,7 +264,7 @@
            */
            
            //* get the traffic
            $tmp = $app->db->query("SELECT traffic_bytes FROM web_traffic WHERE traffic_date like '$current_month%' AND hostname = '$domain'");
            $tmp = $app->db->queryOneRecord("SELECT traffic_bytes FROM web_traffic WHERE traffic_date like '$current_month%' AND hostname = '$domain'");
            $web_traffic = $tmp['traffic_bytes']/1024/1024;
            
            //* Website is over quota, we will disable it
@@ -272,12 +272,12 @@
                ($client_traffic_quota > 0 && $web_traffic > $client_traffic_quota) ||
                ($reseller_traffic_quota > 0 && $web_traffic > $reseller_traffic_quota)) {*/
            if($web_traffic_quota > 0 && $web_traffic > $web_traffic_quota) {
                $app->db->datalogUpdate('web_domain', "traffic_quota_lock = 'y',active = 'n'", 'domain_id', $rec['domain_id']);
                $app->dbmaster->datalogUpdate('web_domain', "traffic_quota_lock = 'y',active = 'n'", 'domain_id', $rec['domain_id']);
                $app->log("Traffic quota for ".$rec['domain_id']." Exceeded. Disabling website.",LOGLEVEL_DEBUG);
            } else {
                //* unlock the website, if traffic is lower then quota
                if($rec['traffic_quota_lock'] == 'y') {
                    $app->db->datalogUpdate('web_domain', "traffic_quota_lock = 'n',active = 'y'", 'domain_id', $rec['domain_id']);
                    $app->dbmaster->datalogUpdate('web_domain', "traffic_quota_lock = 'n',active = 'y'", 'domain_id', $rec['domain_id']);
                    $app->log("Traffic quota for ".$rec['domain_id']." ok again. Enabling website.",LOGLEVEL_DEBUG);
                }
            }