M
marcovoort
Guest
Hi,
We're facing a problem with the PLESK RPC API. We try to register a user, and append a domain to the user. However, the 'add domain'-call does not work properly.
Recently, we upgraded from PLESK9 to 10, after which our API-calls stopped working. After upgrading the PLESK API yesterday to the most recent version, it still did not work properly. While we first created a 'client' and a 'domain', we now have to create a 'customer', then a 'webspace', and after that a 'site', apparently. We have now adjusted this, but it still won't work.
Relevant part of the process (written in php):
- We POST a request to add a customer
- PLESK creates the customer
- We get back a success-message
- We POST a request to add a webspace for the customer
- PLESK creates the webspace
- We don't get back ANY result, php stops executing
We use the php-module CURL to send the requests. The part of php where we send our requests:
We do see curl_exec1, but not curl_exec2, from which we conclude curl_exec() lets the php-script stop. But, not always: the 'add user' works perfectly, only the 'add webspace' does not work. (Before upgrading the API, it was the 'add domain' causing the execution stop with exactly the same symptoms.)
We do not get an error-message from php, however we do have a log from our PLESK server:
We think the SIGTERM causes the plesk-server to not send anything back to php, but we do not know this for sure.
The request-XML we try to send:
We do not get back any result, however, if the domain already exists, we DO get a result, with a corresponding error message 'Domain marcoplesk18.***.** already exists.' (error #1007). We conclude from this the problem only occurs when we call a 'webspace add', but we do not know why or how to solve it.
We also noticed this topic, but that did not help us much.
Several days of investigating didn't help us solving the problem, we hope someone here can help us out.
Thanks in advance.
Marco
EDIT:
Btw, this is added just before sending the request to the server:
We're facing a problem with the PLESK RPC API. We try to register a user, and append a domain to the user. However, the 'add domain'-call does not work properly.
Recently, we upgraded from PLESK9 to 10, after which our API-calls stopped working. After upgrading the PLESK API yesterday to the most recent version, it still did not work properly. While we first created a 'client' and a 'domain', we now have to create a 'customer', then a 'webspace', and after that a 'site', apparently. We have now adjusted this, but it still won't work.
Relevant part of the process (written in php):
- We POST a request to add a customer
- PLESK creates the customer
- We get back a success-message
- We POST a request to add a webspace for the customer
- PLESK creates the webspace
- We don't get back ANY result, php stops executing
We use the php-module CURL to send the requests. The part of php where we send our requests:
Code:
insertLog('curl_exec1');
//Execute the request.
$result = curl_exec($ch);
insertLog('curl_exec2');
We do not get an error-message from php, however we do have a log from our PLESK server:
> POST /enterprise/control/agent.php HTTP/1.1
Host: ***.***.***.***:***
Accept: */*
HTTP_AUTH_LOGIN: *****
HTTP_AUTH_PASSWD: *****
HTTP_PRETTY_PRINT: TRUE
Content-Type: text/xml
Content-Length: 679
[Fri Jul 29 14:09:55 2011] [notice] caught SIGTERM, shutting down
[Fri Jul 29 14:09:57 2011] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Fri Jul 29 14:09:57 2011] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
We think the SIGTERM causes the plesk-server to not send anything back to php, but we do not know this for sure.
The request-XML we try to send:
Code:
<webspace>
<add>
<gen_setup>
<name>marcoplesk18.***.**</name>
<owner-id>90</owner-id>
<htype>vrt_hst</htype>
<ip_address>***.***.***.***</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>*****</value>
</property>
<property>
<name>ftp_password</name>
<value>*****</value>
</property>
<ip_address>***.***.***.***</ip_address>
</vrt_hst>
</hosting>
</add>
</webspace>
We do not get back any result, however, if the domain already exists, we DO get a result, with a corresponding error message 'Domain marcoplesk18.***.** already exists.' (error #1007). We conclude from this the problem only occurs when we call a 'webspace add', but we do not know why or how to solve it.
We also noticed this topic, but that did not help us much.
Several days of investigating didn't help us solving the problem, we hope someone here can help us out.
Thanks in advance.
Marco
EDIT:
Btw, this is added just before sending the request to the server:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.6.3.0">
<!--- request here --->
</packet>
Last edited by a moderator: