When I try to make an e-mail user ( $client->mail_user_add() ) i get error: "SOAP Error: DTD are not supported by SOAP". Can you tell me what to do please?
Hello, It`s very simple how get this to work. Here`s the example script that is included in ISPConfig tar.gz package in remoting_client\examples directory: Look at it: <?php ... ... ... HERE IS THE GOOD example of script that adds a email user. It must contain this parameters ... all of them. Of course you must personalize settings to meet your requirements. $params = array( 'server_id' => 1, 'email' => '[email protected]', 'password' => 'franek', 'quota' => '10', 'maildir' => '/var/vmail/dsad.dsa/franek', 'homedir' => '/var/vmail', 'uid' => '5000', 'gid' => '5000', 'postfix' => 'y', 'disableimap' => '0', 'disablepop3' => '0'); $client_id = 0; $domain_id = $client->mail_user_add($session_id,$client_id, $params); if($client->logout($session_id)) { echo 'Wylogowany.<br />'; } } catch (SoapFault $e) { die('SOAP Blad: '.$e->getMessage()); } ?> I hope this helps you a lot.
Please take a look here in the PHP manual on how to debug this: http://www.php.net/manual/de/ref.soap.php#60935
When I use method posted in link above I still can't repair it. My source code: ... $domain_id = $client->mail_user_add($session_id,$client_id, $params); echo "Response:\n" . $client->__getLastResponse() . "\n"; if($client->logout($session_id)) { echo 'Odhlásený.<br />'; } } catch (SoapFault $e) { die('SOAP Error: '.$e->GetMessage()); } Script will output: Logged into remote server sucessfully. The SessionID is ................. SOAP Error: DTD are not supported by SOAP
Ok, i`ll check this script because I and my friend extended the SOAP functionality. It`s seems that something is wrong with data send to the SOAP. Very likely something is missing in params ... Please be patient. I`ll just checked this script: <?php $username = 'admin'; $password = 'admin'; $soap_location = 'http://xxxxxxxxxx:8080/remote/index.php'; $soap_uri = 'http://xxxxxxxxxxxx:8080/remote/'; $client = new SoapClient(null, array('location' => $soap_location, 'uri' => $soap_uri)); try { if($session_id = $client->login($username,$password)) { echo 'Zalogowany. Sesja:'.$session_id.'<br />'; } $params = array( 'server_id' => 1, 'email' => '[email protected]', 'password' => 'franek', 'quota' => '10', 'maildir' => '/var/vmail/dsad.dsa/franek', 'homedir' => '/var/vmail', 'uid' => '5000', 'gid' => '5000', 'postfix' => 'y', 'disableimap' => '0', 'disablepop3' => '0'); $client_id = 0; $domain_id = $client->mail_user_add($session_id,$client_id, $params); if($client->logout($session_id)) { echo 'Wylogowany.<br />'; } } catch (SoapFault $e) { die('SOAP Blad: '.$e->getMessage()); } ?> It works... so I had no idea why it doesn`t work for you.
Thank you very much for your time. Thank to Till too. I had bad soap location ( $soap_location = 'http://xxxxxxxxxx:8080/remote/index.php'; $soap_uri = 'http://xxxxxxxxxxxx:8080/remote/'; ) You should rewrite this two lines in example file in /remote/example.php in the install package to this lines. In the example file it is written very complicated (maybe only for me).