cPanel API 2 MysqlFE::createdbuser does not work for WHM version 11.48.0
Hello,
I have been using MysqlFE::createdbuser for creating mysql db user for a given database. I was working fine for WHM version < 11.48. But after upgraded into WHM 11.48, this api fails.
PHP Code I used.
$mysql_user = "dmspqrs";
$mysql_pass = "pqrs1234";
require_once("/usr/local/cpanel/php/cpanel.php");
$live = new CPANEL();
$result = $live->api2('MysqlFE', 'createdbuser', array('dbuser' => $mysql_user, 'password' => $mysql_pass));
Result was
Array
(
[cpanelresult] => Array
(
[postevent] => Array
(
[result] => 1
)
[data] => Array
(
)
[event] => Array
(
[result] => 1
)
[apiversion] => 2
[preevent] => Array
(
[result] => 1
)
[error] => 1
[func] => createdbuser
[module] => MysqlFE
)
)
I tried with dbuser={cpanel-user}_pqrs
but received same response with nor reason for error.
Please let me know why this happens with WHM version 11.48.0.
Thanks
- Chamith
-
Hello :) I've not been able to reproduce this issue when testing with the API shell option in cPanel. Can you reproduce this through methods other than the PHP script you are using? Thank you. 0
Please sign in to leave a comment.
Comments
1 comment