Hello all,
I have been trying to use : sites_web_domain_update to change the field "apache_directives".
From what I can see, the DB (table web_domain) values get updated correctly, I get no error messages (in fact, the function reports that 1 row has been altered)
- but -
the vhost file for the zone (in my case, foofoo.com.vhost) *never* gets any changes - at all.
So, then the server does not run as expected
Below is the code being used.
Can someone toss a hint this way as to what might be wrong? It looks like a bug to me ..
TIA
PHP Code:
public function __sitemodifywebdomain($inrecserverid, $inrecclientid,
$indomainid, $indomname, $inlogonid )
{
try {
if ($inrecclientid <= 0 ) { die("=> siteaddwebdomain: For $indomname Invalid client passed: $inrecclientid <br /> "); }
$affected_rows = -999999;
if ( !( $inrecclientid > 0 and $inrecclientid < 9999 ) ) {
die("=> ERROR: Invalid client id: $inrecclientid was passed into sitemodifywebdomain function. Check the system");
}
$client_id = $inrecclientid;
$domain_id = $indomainid;
$myusername = $inlogonid;
if($session_id = $this -> ispclient->login($this -> ispcusername,
$this -> ispcpassword)) {
echo '<br />Logged successfull. Session ID:'.$session_id.'<br />';
}
//* Get the web domain record
$domain_record = $this -> ispclient ->sites_web_domain_get($session_id, $domain_id);
/**
$alias_direct =
"<Alias >" . chr(10) .
"/images/ /var/www/clients/client$client_id/web$domain_id/$myusername"."depo/". chr(10) .
"</Alias>" . chr(10);
**/
$dirctory_direct_one =
"<Directory /var/www/clients/client" . $client_id. "/web" . $domain_id . "/" . $myusername . chr(10) .
"Options FollowSymLinks" . chr(10) .
"AllowOverride All" . chr(10) .
"Order allow,deny" . chr(10) .
"Allow from all" . chr (10) .
"</Directory>";
$dirctory_direct =
"<Directory /var/www/web#/web>" . chr(10) .
"Options FollowSymLinks" . chr(10) .
"AllowOverride All" . chr(10) .
"Order allow,deny" . chr(10) .
"Allow from all" . chr (10) .
"</Directory>";
$apache_direct = $dirctory_direct . $dirctory_direct_one;
//* Change parameters
$domain_record['apache_directives'] = $apache_direct;
print_r($domain_record);
$affected_rows = $this -> ispclient ->sites_web_domain_update($session_id, $client_id, $domain_id, $domain_record);
echo "Number of records that have been changed in the database: ".$affected_rows."<br>";
if($this -> ispclient ->logout($session_id)) {
echo 'Logged out.<br />';
}
} catch (SoapFault $e) {
echo $this -> ispclient ->__getLastResponse();
die('SOAP Error: '.$e->getMessage());
}
}
Forgot to add that when doing a "print_r", I get the following and "web_domain-apache_directives" has the correct information ..
[domain_id] => 72
[sys_userid] => 119
[sys_groupid] => 119
[sys_perm_user] => riud
[sys_perm_group] => ru
[sys_perm_other] =>
[server_id] => 1
[ip_address] => *
[domain] => foofoo.com
[type] => vhost
[parent_domain_id] => 0
[vhost_type] => name
[document_root] => /var/www/clients/client118/web72
[system_user] => web72
[system_group] => client118
[hd_quota] => -1
[traffic_quota] => -1
[cgi] => y
[ssi] => y
[suexec] => y
[errordocs] => 1
[is_subdomainwww] => 1
[subdomain] => www
[php] => mod
[ruby] => y
[redirect_type] => no
[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] => <Directory /var/www/web#/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory><Directory /var/www/clients/client118/web72/a000123mdepo
Options FollowSymLinks
AllowOverride All
Order
Recent comments
1 day 2 hours ago
1 day 8 hours ago
1 day 12 hours ago
1 day 14 hours ago
1 day 22 hours ago
2 days 8 hours ago
2 days 9 hours ago
2 days 12 hours ago
2 days 17 hours ago
2 days 17 hours ago