Our sysop upgraded the server's cpanel to 11.28. Our cPanel XML API code was working perfectly fine before the upgrade. Unfortunately now when we run our code, it creates the database okay, but then below when we create the user, it's failing to do anything:
...where $sDBUser = 'webmdorg_test12', $sDBPass = 'pass123456', $this->_sCPUser = 'webmdorg'. Note I'm using the common XMLAPI class for PHP that people commonly use with cpanel, which I downloaded out of the forums here. Note also that the database is named webmdorg_test12 -- matching the same thing as the db user.Code:$asArgs = array(); $asArgs[] = $sDBUser; $asArgs[] = $sDBPass; $this->_XMLAPI->api1_query($this->_sCPUser, 'Mysql', 'adduser', $asArgs);
What I end up with is a database 'webmdorg_test12', but no user and no error in PHP.
So you might be wondering if we have db prefixing on or off. Well, in WHM, it has the "Disable DB Prefixing" option available to us, but we didn't select it. And when I go into a user's MySQL Databases control panel in cpanel, it shows prefixes (based on the cpanel account name) in front of the database name field and username field. And no, we have not yet run "/usr/local/cpanel/bin/setupdbmap" and don't know we need to do so or not.
Please help! We're confused, and we have customers who depend on this to work.
EDIT 1:
The XML object response I get back from the API is this:
Code:SimpleXMLElement Object ( [module] => Mysql [func] => adduser [type] => event [source] => internal [apiversion] => 1 [data] => SimpleXMLElement Object ( [result] => SimpleXMLElement Object ( ) ) [event] => SimpleXMLElement Object ( [result] => 1 ) )



LinkBack URL
About LinkBacks
Reply With Quote




