SOAP Fault : log_retention_error_regex

Discussion in 'ISPConfig 3 Priority Support' started by sweetromain, Oct 1, 2017.

  1. sweetromain

    sweetromain New Member HowtoForge Supporter

    Hello can you say me please, why I have this :
    PHP:
        function add_domain_gen($listParams) {
            
    $db=new PDO('mysql:host=localhost;dbname=information_schema''user''password');

            
    $query=$db->prepare("SELECT `AUTO_INCREMENT` FROM `TABLES` WHERE `TABLE_SCHEMA` LIKE 'dbispconfig' AND `TABLE_NAME` LIKE 'web_domain'");
            
    $query->execute();
            
    $result $query->fetchAll()[0][0];
            
    $domain_id=intval($result);
            
    $clientClass client::getInstance();
            
    $api_client $clientClass->api_client;
            
    $session_id $listParams['session_id'];
            
    //$domain_id = strval($api_client->sites_web_domain_get_last_id($session_id)['domain_id'] + 1);
            
    $websitepath '/var/www/clients/client0/gen_booster';
            
    $websitedomain $listParams['domain'];
          
          
            
    $params = array(
                
    'domain_id' => $domain_id,
                
    'server_id' => '1',
                
    'ip_address' => '*',
                
    'domain' => $listParams['domain'],
                
    'type' => 'vhost',
                
    'parent_domain_id' => '0',
                
    'vhost_type' => 'name',
                
    'document_root' => $websitepath,
                
    'system_user' => 'web202',
                
    'system_group' => "client0",
                
    'hd_quota' => "-1",
                
    'traffic_quota' => "-1",
                
    'suexec' => 'y',
                
    'errordocs' => '1',
                
    'subdomain' => 'www.',
                
    'php' => 'fast-cgi',
                
    'ssl' => 'y',
                
    'ssl_letsencrypt' => 'y',
                
    'stats_type' => "webalizer",
                
    'http_port' => '80',
                
    'https_port' => '443',
                
    'php_fpm_use_socket' => 'y',
                
    'pm' => 'dynamic',
                
    'pm_max_children' => '10',
                
    'pm_start_servers' => '2',
                
    'pm_min_spare_servers' => '1',
                
    'pm_max_spare_servers' => '5',
                
    'pm_process_idle_timeout' => '10',
                
    'pm_max_requests' => '0',
                
    'php_open_basedir' => $websitepath '/web:' $websitepath '/private:' $websitepath '/tmp:/var/www/' $websitedomain '/web:/srv/www/' $websitedomain '/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom',
                
    'backup_interval' => 'none',
                
    'backup_copies' => '1',
                
    'allow_override' => 'All',
                
    'added_date' => date('Y-m-d'),
                
    'active' => 'y'
            
    );
            
    $api_client->sites_web_domain_add($session_id"0"$params);
          
            
    $error=0;
            while(!
    is_dir('/var/www/clients/client0/gen_booster')){
                
    sleep(1);
                if(
    $error 300){
                    return array(
    'erreur'=>"Le dossier n'a pas pu ĂȘtre trouvĂ©");
                }
                
    $error++;
            }
          
            return 
    $params;
        }
     
    Last edited: Oct 2, 2017
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    you can add
    Code:
    'log_retention' => '1'
    to the api-call. See interface/web/sites/form/web_vhost_domain.tform.php
     
  3. sweetromain

    sweetromain New Member HowtoForge Supporter

    It work. Thanks
     

Share This Page