Hello all, Was following the information in this thread: http://www.howtoforge.com/forums/showthread.php?t=52349&highlight=system_user and trying to make change to the apache_directive so that it will support an alias. When using the item below, it totally destroys the nameserver and I have to remove the zone by hand or else nothing will come up. Does anyone out there know how to change the item below so that it will be peacefully accepted as a good apache_directive? TIA $alias_direct = "<Alias > /images/ /var/www/clients/client$client_id/web$domain_id/$myusername"."depo/". "</Alias>" . chr(10);
ISPConfig 3: ok, now this looks like a bug ... 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: 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 FollowSymLinksAllowOverride AllOrder allow,denyAllow from all</Directory><Directory /var/www/clients/client118/web72/a000123mdepoOptions FollowSymLinksAllowOverride AllOrder