Problems creating users with Unlimited bandwith

MeyR

Verified User
Joined
May 6, 2008
Messages
10
Hi Guys,

Sorry for this irritating topic, but when I use the DirectAdmin API to create users like the way below, the configuration of the user in DirectAdmin says: Bandwidth: 0. Can anyone give me some help?

$UnlimitedBandwidth = "'ubandwidth' => ON,";

$Socket->query('/CMD_API_ACCOUNT_USER',
array(
...
'bandwidth' => "",
$UnlimitedBandwidth,
...

Is this a bug in DirectAdmin or something?

Thank you in advance,

Kind regards,

Stephan Meijer
 
Last edited:
Generally the 0 means unlimited. When you look at the site afterwards in the DirectAdmin reseller interface does it show the unlimited box checked or not?

Jeff
 
Hi Jeff,

See my screenshot.

Thank you,

Kind regards,
Stephan Meijer
 

Attachments

  • DirectAdmin bug.png
    DirectAdmin bug.png
    15.6 KB · Views: 112
And i see it's the same with creating resellers. This must be a bug ..
 
It seems unusual that bug this limiting could have made it this many years without being noticed. Hopefully John can take a look at it.

Jeff
 
Hello,

I believe I've already replied to this via email, but in any case, for anyone else.. when using the API, you must duplicate what the browser passes exactly.

When debugging this.. in order to compare what you pass, vs what the browser passes, use this guide:
http://help.directadmin.com/item.php?id=293

and use the " | grep string" option to filter out what you want. See what the browser passes DA, and what you're passing to DA.

As well, I'm not sure about the way you're using strings:
PHP:
$UnlimitedBandwidth = "'ubandwidth' => ON,";
because that may interpret is as an actual string with the => characters in the string, as opposed to making it an array.

When starting out, stick with this format for everything.. and once it works, you can expand from there:
http://www.directadmin.com/sample_api.txt

John
 
Back
Top