Symptoms
An API request with the
<client-template> tag may return the incorrect value in
max_db field if the maximum number of MySQL databases equals 0 in Parallels Panel (see
General,
Clients,
Client Templates, some template (for example -
test),
Maximum number of MySQL databases).
In Parallels Panel database the parameter looks correct:
Select * from [tmpldata] where tmpl_id=1 and element="max_db"
Result:
max_db=0But the result will be different by API request. It is possible to reproduce by the following steps:
1. The following request should be sent to Panel:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.4.2.0">
<client-template><get><filter/><limits/><permissions/><ip-pool/><preferences/></get></client-template>
</packet>
2. The following request may be received:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.4.2.0">
<client-template>
<get>
<result>
<status>ok</status>
<id>1</id>
<name>support</name>
<limits>
<max_db>-1</max_db>
</limits>
Resolution
It is necessary to replace the
%plesk_dir%\admin\plib\api-rpc\AgentClientTemplate.php file with the
attachment. See the
http://kb.parallels.com/en/1802 article about hot-fix installation procedure.