HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Remote API error after updating to 3.0.4 (http://www.howtoforge.com/forums/showthread.php?t=54814)

snowfly 7th November 2011 09:02

Remote API error after updating to 3.0.4
 
Recently updated from 3.0.3.3 to 3.0.4, and now one of our Remoting API calls fails, sites_web_domain_update().
This worked perfectly fine before in 3.0.3.3

The error is:
pm_max_children_error_regex
pm_start_servers_error_regex
pm_min_spare_servers_error_regex
pm_max_spare_servers_error_regex

Have the remoting functions changed in 3.0.4 or perhaps parameters changed?

till 7th November 2011 09:25

The API has extended due to nginx support. Do you use 3.0.4 beta or final code, as the error above should not occur with 3.0.4 final.

snowfly 7th November 2011 09:27

Here is the full soap exception:

Code:

SoapFault Object
(
    [message:protected] => pm_max_children_error_regex
pm_start_servers_error_regex
pm_min_spare_servers_error_regex
pm_max_spare_servers_error_regex

    [string:private] =>
    [code:protected] => 0
    [file:protected] => /var/www/clients/clientXXX/webXXX/app/ispconfig.class.php
    [line:protected] => 150
    [trace:private] => Array
        (
            [0] => Array
                (
                    [function] => __call
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0] => sites_web_domain_update
                            [1] => Array
                                (
                                    [0] => 4aff2061d8a6295527c6f72dfc7bca93
                                    [1] => XXX
                                    [2] => XXX
                                    [3] => Array
                                        (
                                            [server_id] => 3
                                            [ip_address] => *
                                            [domain] => XXX
                                            [type] => vhost
                                            [parent_domain_id] =>
                                            [vhost_type] => name
                                            [hd_quota] => -1
                                            [traffic_quota] => -1
                                            [cgi] => n
                                            [ssi] => n
                                            [suexec] => y
                                            [errordocs] => 1
                                            [subdomain] => www
                                            [ssl] => n
                                            [php] => fast-cgi
                                            [ruby] => n
                                            [active] => y
                                            [redirect_type] =>
                                            [redirect_path] =>
                                            [ssl_state] =>
                                            [ssl_organisation] =>
                                            [ssl_organisation_unit] =>
                                            [ssl_country] =>
                                            [ssl_domain] =>
                                            [ssl_request] =>
                                            [ssl_cert] =>
                                            [ssl_bundle] =>
                                            [ssl_action] =>
                                            [stats_password] =>
                                            [stats_type] => awstats
                                            [backup_interval] => daily
                                            [backup_copies] => 3
                                            [document_root] => /var/www/clients/clientXXX/webXXX
                                            [system_user] => webXXX
                                            [system_group] => clientXXX
                                            [allow_override] => All
                                            [php_open_basedir] => /var/www/clients/clientXXX/webXXX/web:/var/www/clients/clientXXX/webXXX/tmp:/var/www/XXX/web:/srv/www/XXX/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
                                            [custom_php_ini] =>
                                            [apache_directives] =>
                                            [client_group_id] => 9
                                        )

                                )

                        )

                )


till 7th November 2011 09:29

Do you use 3.0.4 beta or final code?

snowfly 7th November 2011 09:37

Quote:

Originally Posted by till (Post 266885)
Do you use 3.0.4 beta or final code?

Should be 3.0.4 final, as I used the web interface to do the ISPConfig update.

till 7th November 2011 09:41

Do you have these lines starting on line 1356 in the file /usr/local/interface/web/lib/remoting.inc.php?

Code:

//* Set a few defaults for nginx servers
                if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
                if($params['pm_start_servers'] == '') $params['pm_start_servers'] = 1;
                if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1;
                if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1;


snowfly 7th November 2011 09:49

I don't have a file at: /usr/local/interface/web/lib/remoting.inc.php
But do have: /usr/local/ispconfig/interface/lib/classes/remoting.inc.php

And yes line 1356 has this:
Code:

//* Set a few defaults for nginx servers
                if($params['pm_max_children'] == '') $params['pm_max_children'] = 1;
                if($params['pm_start_servers'] == '') $params['pm_start_servers'] = 1;
                if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1;
                if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1;


till 7th November 2011 10:00

Ok. Your path is right of course :) I guess we should have to add the same lines for the update function then too. Please add the same lines directly after line 1374, that should set default values so that you dont have to add the new parameters to your existng scripts.

snowfly 7th November 2011 10:16

Ok I added the following params to the sites_web_domain_update() API call, and now this works fine :)

'pm_max_children' => 1,
'pm_start_servers' => 1,
'pm_min_spare_servers' => 1,
'pm_max_spare_servers' => 1

till 7th November 2011 10:16

Ok. Will add the lines to the function in svn, so it should work with unpatched scripts in future as well.


All times are GMT +2. The time now is 21:07.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.