View Single Post
  #12  
Old 6th December 2011, 14:26
vaio1 vaio1 is offline
Senior Member
 
Join Date: Jul 2007
Location: Italy
Posts: 664
Thanks: 77
Thanked 12 Times in 7 Posts
Default

Hi Till,

the path is escaped because the array that I shown you is a json encode array.

These are your parameters for sites_ftp_user_add:
Code:
	$params = array(
			'server_id' => 1,
			'parent_domain_id' => 1,
			'username' => 'threep',
			'password' => 'wood',
			'quota_size' => 10000,
			'active' => 'y',
			'uid' => '5000',
			'gid' => '5000',
			'dir' => 'maybe',
			'quota_files' => -1,
			'ul_ratio' => -1,
			'dl_ratio' => -1,
			'ul_bandwidth' => -1,
			'dl_bandwidth' => -1
			);
and these are mine:

Code:
Paramenters: {
   "server_id":1,
   "parent_domain_id":3800,
   "username":"jdoe_ftp1",
   "password":"bexujuga",
   "quota_size":"3000",
   "active":"y",
   "uid":"web135",
   "gid":"client3800",
   "dir":"\/var\/www\/clients\/client135\/web3800",
   "quota_files":-1,
   "ul_ratio":-1,
   "dl_ratio":200,
   "ul_bandwidth":-1,
   "dl_bandwidth":100
}
These are your parameters for sites_web_domain_add:

Code:
	$params = array(
			'server_id' => 0,
			'ip_address' => '',
			'domain' => 'test2.int',
			'type' => 'vhost',
			'parent_domain_id' => 0,
			'vhost_type' => 'name',
			'hd_quota' => 100000,
			'traffic_quota' => -1,
			'cgi' => 'y',
			'ssi' => 'y',
			'suexec' => 'y',
			'errordocs' => 1,
			'is_subdomainwww' => 1,
			'subdomain' => '',
			'php' => 'y',
			'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' => '',
			'backup_copies' => 1,
			'active' => 'y',
			'traffic_quota_lock' => 'n'
			);
and these are mine:

Code:
Parameters: {
   "server_id":"1",
   "ip_address":"",
   "domain":"testdomain.com",
   "type":"vhost",
   "parent_domain_id":0,
   "vhost_type":"name",
   "hd_quota":"3000",
   "traffic_quota":"12000",
   "errordocs":1,
   "is_subdomainwww":1,
   "subdomain":"www",
   "php":"fast-cgi",
   "active":"y",
   "traffic_quota_lock":"n",
   "system_user":"web1",
   "allow_override":"All",
   "custom_php_ini":"",
   "apache_directives":""
}
I have sent the main and not null parameters because I think that you have check all the parameters received from a calling or not?!
Have I to send all the parameters?


Thanks for your help.
Reply With Quote