ISPConfig 3.0.5.4p3 impossible to add site through remote API

Discussion in 'Developers' Forum' started by raveiga, Aug 22, 2014.

  1. raveiga

    raveiga New Member

    ISPConfig 3.0.5.4p3 impossible to add site through remote API (sites_web_domain_add)

    I installed a few days ago the new ISPConfig version, and I tried to use my old scripts with this version, but adding a Site fails in the procedure sites_web_domain_add()

    I tried with a lot of combinations, and I get allways a SOAP Error with no information about the problem.

    Note:I can add a client and DNS with no problem using the API, but when I try to add the site, it fails.

    In my app i get Fatal error: Uncaught SoapFault exception: [data_processing_error]
    In the following source code I don't get any information about the SOAP error.

    Source code:

    PHP:
    <?php
    require('soap_config.php');

    if(
    $session_id $client->login($username$password)) {
        echo 
    'Logged successfull. Session ID:'.$session_id.'<br />';
    }

    try {
    $client_id15;

    $params = array(
        
    'pm_max_requests' => 0,
        
    'pm_process_idle_timeout' => 10,
        
    'server_id' => $server_id,
        
    'ip_address' => '*',
        
    'domain' => 'test.local',
        
    'type' => 'vhost',
        
    'parent_domain_id' => 0,
        
    'vhost_type' => 'name',
        
    'document_root' => '',
        
    'system_user' => '',
        
    'system_group' => '',
        
    'hd_quota' => 100,
        
    'traffic_quota' => -1,
        
    'cgi' => 'n',
        
    'ssi' => 'n',
        
    'suexec' => 'y',
        
    'errordocs' => 1,
        
    'is_subdomainwww' => 1,
        
    'subdomain' => 'www',
        
    'php' => 'mod',
        
    'ruby' => 'n',
        
    'redirect_type' => '',
        
    'redirect_path' => '',
        
    'ssl' => 'n',
        
    'ssl_state' => '',
        
    'ssl_locality' => '',
        
    'ssl_organisation' => '',
        
    'ssl_organisation_unit' => '',
        
    'ssl_country' => 'ES',
        
    'ssl_domain' => '',
        
    'ssl_request' => '',
        
    'ssl_cert' => '',
        
    'ssl_bundle' => '',
        
    'ssl_action' => '',
        
    'stats_password' => '',
        
    'stats_type' => 'webalizer',
        
    'allow_override' => 'All',
        
    'apache_directives' => '',
        
    'php_open_basedir' => '/',
        
    'custom_php_ini' => '',
        
    'backup_interval' => 'daily',
        
    'backup_copies' => 1,
        
    'active' => 'y',
        
    'traffic_quota_lock' => 'n'
    );

    $client->sites_web_domain_add($session_id$client_id $params$readonly false);

    } catch (
    SoapFault $e) {
            echo 
    $client->__getLastResponse();
            die(
    'SOAP Error: '.$e->getMessage());
    }
    ?>
    Result:
    ---------------------
    Logged successfull. Session ID:835abd1b71c14637ee8beacd0f91289e
    SOAP Error:

    ---------------------

    If I print the object I get the following:


    Logged successfull. Session ID:ddf8699fec0511960ccc1e7603d8cf4b<br />SoapClient Object
    (
    [uri] => https://10.0.5.2:8080/remote/
    [location] => https://10.0.5.2:8080/remote/index.php
    [_soap_version] => 1
    [httpurl] => Resource id #5
    [__soap_fault] => SoapFault Object
    (
    ........
    .....private] => Array
    (
    [0] => Array
    (
    [file] => /var/www/clients/client1/web1/web/test.php
    [line] => 58
    [function] => __call
    [class] => SoapClient
    [type] => ->
    [args] => Array
    (
    [0] => sites_web_domain_add
    [1] => Array
    (
    [0] => ddf8699fec0511960ccc1e7603d8cf4b
    [1] => 16
    [2] => Array
    (
    [pm_max_requests] => 0
    [pm_process_idle_timeout] => 10
    [server_id] => 1
    [ip_address] => *
    [domain] => test.local
    [type] => vhost
    [parent_domain_id] => 0
    [vhost_type] => name
    [document_root] =>
    [system_user] =>
    [system_group] =>
    [hd_quota] => 100
    [traffic_quota] => -1
    [cgi] => n
    [ssi] => n
    [suexec] => y
    [errordocs] => 1
    [is_subdomainwww] => 1
    [subdomain] => www
    PHP:
     => mod
                                                        
    [ruby] => n
                                                        
    [redirect_type] => 
                                                        [
    redirect_path] => 
                                                        [
    ssl] => n
                                                        
    [ssl_state] => 
                                                        [
    ssl_locality] => 
                                                        [
    ssl_organisation] => 
                                                        [
    ssl_organisation_unit] => 
                                                        [
    ssl_country] => 
                                                        [
    ssl_domain] => 
                                                        [
    ssl_request] => 
                                                        [
    ssl_cert] => 
                                                        [
    ssl_bundle] => 
                                                        [
    ssl_action] => 
                                                        [
    stats_password] => 
                                                        [
    stats_type] => webalizer
                                                        
    [allow_override] => All
                                                        
    [apache_directives] => 
                                                        [
    php_open_basedir] => /
                                                        [
    custom_php_ini] => 
                                                        [
    backup_interval] => daily
                                                        
    [backup_copies] => 1
                                                        
    [active] => y
                                                        
    [traffic_quota_lock] => n
                                                    
    )

                                                [
    3] => 
                                            )

                                    )

                            )

                        [
    1] => Array
                            (
                                [
    file] => /var/www/clients/client1/web1/web/test.php
                                
    [line] => 58
                                
    [function] => sites_web_domain_add
                                
    [class] => SoapClient
                                
    [type] => ->
                                [
    args] => Array
                                    (
                                        [
    0] => ddf8699fec0511960ccc1e7603d8cf4b
                                        
    [1] => 16
                                        
    [2] => Array
                                            (
                                                [
    pm_max_requests] => 0
                                                
    [pm_process_idle_timeout] => 10
                                                
    [server_id] => 1
                                                
    [ip_address] => *
                                                [
    domain] => test.local
                                                
    [type] => vhost
                                                
    [parent_domain_id] => 0
                                                
    [vhost_type] => name
                                                
    [document_root] => 
                                                [
    system_user] => 
                                                [
    system_group] => 
                                                [
    hd_quota] => 100
                                                
    [traffic_quota] => -1
                                                
    [cgi] => n
                                                
    [ssi] => n
                                                
    [suexec] => y
                                                
    [errordocs] => 1
                                                
    [is_subdomainwww] => 1
                                                
    [subdomain] => www
                                                
    [php] => mod
                                                
    [ruby] => n
                                                
    [redirect_type] => 
                                                [
    redirect_path] => 
                                                [
    ssl] => n
                                                
    [ssl_state] => 
                                                [
    ssl_locality] => 
                                                [
    ssl_organisation] => 
                                                [
    ssl_organisation_unit] => 
                                                [
    ssl_country] => ES
                                                
    [ssl_domain] => 
                                                [
    ssl_request] => 
                                                [
    ssl_cert] => 
                                                [
    ssl_bundle] => 
                                                [
    ssl_action] => 
                                                [
    stats_password] => 
                                                [
    stats_type] => webalizer
                                                
    [allow_override] => All
                                                
    [apache_directives] => 
                                                [
    php_open_basedir] => /
                                                [
    custom_php_ini] => 
                                                [
    backup_interval] => daily
                                                
    [backup_copies] => 1
                                                
    [active] => y
                                                
    [traffic_quota_lock] => n
                                            
    )

                                        [
    3] => 
                                    )

                            )

                    )
    )........

    SOAP Error: <br>
    <
    br>


    Any ideas to fix this?

    Thank you very much.
     
    Last edited: Aug 22, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. raveiga

    raveiga New Member

    Last edited: Aug 22, 2014
  4. bmi64

    bmi64 New Member HowtoForge Supporter

    I'll have a look there if it can help me thanks !
     

Share This Page