I can't reproduce it. Look, I have following php script for sending API RPC request:
<?php
$host="10.58.103.100";
$login="admin";
$passwd="setup";
$port=8443;
$data = <<<EOF
<packet version="1.6.5.0">
<site-alias>
<create>
<status>0</status>
<pref>
<web>1</web>
<mail>0</mail>
<tomcat>0</tomcat>
<seo-redirect>false</seo-redirect>
</pref>
<manage-dns>0</manage-dns>
<site-id>4</site-id>
<name>domain.nm</name>
</create>
</site-alias>
</packet>
EOF;
function write_callback($ch, $data) {
echo $data;
return strlen($data);
}
function sendCommand($data, $login, $passwd, $host, $port=8443) {
$script = "enterprise/control/agent.php";
$url = "https://$host:$port/$script";
$headers = array(
"HTTP_AUTH_LOGIN: $login",
"HTTP_AUTH_PASSWD: $passwd",
"HTTP_PRETTY_PRINT: TRUE",
"Content-Type: text/xml",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, &$headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_WRITEFUNCTION, write_callback);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$result = curl_exec($ch);
if (!$result) {
echo "\n\n-------------------------\ncURL error number:".curl_errno($ch);
echo "\n\ncURL error:".curl_error($ch);
}
curl_close($ch);
return;
}
sendCommand($data, $login, $passwd, $host, $port);
?>
I have just run it:
# php api.php
* About to connect() to 10.58.103.100 port 8443 (#0)
* Trying 10.58.103.100... * connected
* Connected to 10.58.103.100 (10.58.103.100) port 8443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject:
[email protected],CN=Parallels Panel,OU=Parallels Panel,O=Parallels,L=Herndon,ST=Virginia,C=US
* start date: Sep 28 01:03:39 2011 GMT
* expire date: Sep 27 01:03:39 2012 GMT
* common name: Parallels Panel
* issuer:
[email protected],CN=Parallels Panel,OU=Parallels Panel,O=Parallels,L=Herndon,ST=Virginia,C=US
> POST /enterprise/control/agent.php HTTP/1.1
Host: 10.58.103.100:8443
Accept: */*
HTTP_AUTH_LOGIN: admin
HTTP_AUTH_PASSWD: setup
HTTP_PRETTY_PRINT: TRUE
Content-Type: text/xml
Content-Length: 269
< HTTP/1.1 200 OK
< Server: sw-cp-server
< Date: Tue, 31 Dec 2013 07:25:58 GMT
< Content-Type: text/xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< P3P: CP="NON COR CURa ADMa OUR NOR UNI COM NAV STA"
< Last-Modified: Tue, 31 Dec 2013 07:25:51 GMT
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Set-Cookie: PHPSESSID=3a7100ca72c9e862ef0ee4760b87ceee; path=/; secure; httponly
< Set-Cookie: locale=en-US; expires=Wed, 31-Dec-2014 07:25:51 GMT; path=/
<
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
<site-alias>
<create>
<result>
<status>ok</status>
<id>1</id>
</result>
</create>
</site-alias>
</packet>
* Connection #0 to host 10.58.103.100 left intact
* Closing connection #0
And on target server I see:
mysql> select * from domain_aliases;
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
| id | dom_id | dns_zone_id | status | name | displayName | dns | mail | web | tomcat | seoRedirect |
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
| 1 | 4 | 12 | 0 | domain.nm | domain.nm | false | false | true | false | false |
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
1 row in set (0.00 sec)