View Single Post
Old 28th March 2011, 00:54
xaver xaver is offline
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts

Ok this way work too

i hope you give Domain Module and client_update with templates a look too
getNextID, maybe next version -> The Idear was for a post in forum. The post used mysql connection...

I have still another problem and found no solution.
I wrote 3 versions for API use.
1. version i changed a lot in for add a website and it worked
2. version never in use on my system..
3. on dev server no problem, on productive server wont work.

if i setup a account with api, it work but client is always client0 -> but variable isset....
if i setup with interface, document root, system group .. everything is same as i send with API.

PHP Code:
public function addWebsite($traffic,$webspace){
$this->web_id $this->sites_web_domain_nextID();
$documentroot "/var/www/clients/client".$this->client_id."/web".$this->web_id;
$system_user "web".$this->web_id;
$system_group 'client'.$this->client_id;
    try {
$params = array('server_id' => $this->serverid,
'ip_address' => '*',
'domain' => $this->domain,
'type' => 'vhost',
'parent_domain_id' =>'',
'vhost_type' =>'name',
'hd_quota' => $webspace,
'traffic_quota' => $traffic,
'cgi' =>'n',
'ssi' =>'n',
'suexec' =>'n',
'errordocs' =>'1',
'subdomain' =>'www',
'ssl' =>'n',
'php' =>'mod',
'active' => 'y',
'redirect_type' =>'',
'redirect_path' =>'',
'ssl_state' =>'',
'ssl_locality' =>'',
'ssl_organisation' =>'',
'ssl_organisation_unit' =>'',
'ssl_country' =>'',
'ssl_domain' =>'',
'ssl_request' =>'',
'ssl_cert' =>'',
'ssl_bundle' =>'',
'ssl_action' =>'',
'stats_type' => 'webalizer',
'stats_password' =>'',
'document_root' => $documentroot
'system_user' =>$system_user,
'system_group' =>$system_group,
'allow_override' =>'Indexes AuthConfig FileInfo',
'php_open_basedir' => $php_open_basedir,
'apache_directives' =>'',
'backup_interval' => 'none',
'custom_php_ini' => NULL,
'backup_copies' => 1,
$this->web_id $this->session->sites_web_domain_add($this->session_id$this->client_id$params);
    catch (
SoapFault $e) {
'SOAP Error: '.$e->getMessage());

i hope its understandable.

Reply With Quote