#1  
Old 8th January 2013, 04:21
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Exclamation Subdomains and API

I have for a while been trying out the creation of sub-domains via API but I have noticed some inconsistencies which I should bring to your attention.

Having used the default sample code to create one, I noticed the following after execution:

1. ip_address is NULL
2. vhost_type is NULL
3. document_root is NULL
4. web_folder is NULL
5. hd_quota is 0
6. traffic_quota is -1

Please take note that in the real implementation ALL variables were provided. So either am missing out something or a problem with the code.

Please advice, and thanks

Code:
	$params = array(
			'server_id' => 1,
			'ip_address' => '*',
			'domain' => 'tsssssubt.int',
			'type' => 'vhostsubdomain',
			'parent_domain_id' => 1,
			'vhost_type' => 'name',
			'document_root' => '/web/dom',
			'system_user' => 'benutzer',
			'system_group' => 'gruppe',
			'hd_quota' => 100000,
			'traffic_quota' => "1000",
			'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' => '/php',
			'custom_php_ini' => '',
			'backup_interval' => '',
			'backup_copies' => 1,
			'active' => 'y',
			'traffic_quota_lock' => 'n'
			);
Reply With Quote
Sponsored Links
  #2  
Old 8th January 2013, 04:24
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
Default

Below is a sample or print_r($params) of a real implementation:

Array ( [server_id] => 1 [ip_address] => [domain] => jesus.abdi.com [type] => vhostsubdomain [parent_domain_id] => 52 [vhost_type] => name [document_root] => /var/www/clients/client55/web52 [web_folder] => web/jesus [hd_quota] => 100 [traffic_quota] => 3,084 [cgi] => y [ssi] => y [suexec] => y [errordocs] => 1 [is_subdomainwww] => 1 [subdomain] => www [php] => php-fpm [stats_password] => Jesus [stats_type] => awstats [allow_override] => All [pm] => dynamic [pm_max_children] => 10 [pm_start_servers] => 2 [pm_max_spare_servers] => 5 [php_open_basedir] => / [pm_process_idle_timeout] => 10 [pm_max_requests] => 100 [backup_interval] => monthly [backup_copies] => 1 [active] => y )
Reply With Quote
  #3  
Old 8th January 2013, 04:38
abdi abdi is offline
Senior Member
 
Join Date: Sep 2012
Posts: 118
Thanks: 0
Thanked 10 Times in 6 Posts
 
Default

I just noticed that much documentation is missing in the API docs. I used the get_function_list($session_id) and realized a number of new functions including that of sites_web_vhost_subdomain_* functions. I used those and everything worked out fine just as expected ..

Thanks, Joseph
Reply With Quote
The Following User Says Thank You to abdi For This Useful Post:
mrtnzlml (3rd October 2013)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
create subdomains with forwarding api bryxal Installation/Configuration 6 15th August 2006 18:53


All times are GMT +2. The time now is 14:06.


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