problem with WHMCS

urgido

Verified User
Joined
Oct 28, 2008
Messages
429
Location
MX
I have problem after upgrade to 1.34

Problems is when I try to create a package from WHMCS DA reply to me the following:

Module Command Error
A valid IP was not provided

before upgrade to 1.34 this error was not appears.


REGARDS
 
WHMCS uses scripts to manage the DirectAdmin API. How do you know the error is coming from DirectAdmin? Where do you see the error?

Jeff
 
I see it in WHMCS when I try to create a hosting account


support ticket to MATT:

ME:
"My problem is posted here: http://forum.whmcs.com/showthread.php?t=24270

Can you give a hand?"

MATT:
"Hi,

Instructions on how to setup your DirectAdmin packages can be found here: http://wiki.whmcs.com/DirectAdmin"

ME:
"The problem is not when an order is placed, the problem is comming when I
try to create a package from the profile of the user. WHMCS force to me to
write a value in Dedicated Ip field but if I write an ip, an error appears
like this: "Invalid IP"

MATT:
"Hi,

WHMCS doesn't force you to enter an IP and doesn't use whatever you do enter in that field. This error is from the DirectAdmin API. Need to check with them what the cause is."


ME:
"What I need to check to avoid force me write a dedicated ip?

I can't fix this issue"


MATT:
"Hi,

I've never seens this message before from DirectAdmin. Maybe it means there is no available IPs on your server for new accounts but you would need to check with DirectAdmin for a definitive answer as this is coming from their panel

Regards,"


ME:
"have 13 usable ips... is there a way to avoid the dedicated ip field?"


MATT:
"The dedicated IP field is not used by the DirectAdmin module. As explained previously , this error from their panel has nothing to do with that."




REGARDS
 
Hello,

The error text:

"A valid IP was not provided"

is generated by DA when a valid IP is not passed to DA when creating a User. It's likely that either the IP not being passed at all, or an invalid IP is being passed.

However, to confirm what is or isn't being passed, run DA in debug mode to check.

Go to the page in WHMCS so that you're 1 click away from duplicating that error, but don't submit it yet.
Login to ssh on your DA box and type
Code:
cd /usr/local/directadmin/
killall -9 directadmin
./directadmin b2000
Now DA is ready to spit out whatever it's getting.
Go back into WHMCS and click the submit button to pass the request to DA.
You'll get a large amount of text, but you're looking for the "Post string:" value in the output.

With that post string, we're looking for something like &ip=1.2.3.4&... where 1.2.3.4 is the IP it's passing, among other data passed to DA like the username, password, email, domain name, package, etc..

Let us know if the "ip" value is missing, or what the value being passed is. Note that even extra spaces in the ip value would make it invalid.

In case there is a misunderstanding at the other end with the WHMCS tech, the "ip" value is always required when creating a new User in DA.

As a rule, I always investigate before coming to conclusions as to what's wrong.

John
 
the ip value is missing

Debug set to level 2000
DirectAdmin 1.34.0
Accepting Connections on port 2222
Sockets::handshake - begin
Sockets::handshake - end
0: Accept: */*
1: Authorization: Basic ZXpwYXppbzp1cmdpZGlu
2: Host: www.mydomain.com:2222
InternalText::init(user)
InternalText::init(command)
Command::doCommand(/CMD_API_ACCOUNT_USER)
InternalText::init(user)
Command::doCommand(/CMD_API_ACCOUNT_USER) : finished
Command::run: finished /CMD_API_ACCOUNT_USER


I use force_host in directadmin.conf
 
Last edited:
Hello,

The force_hostname could be causing the problem.
Update to 1.34.1 which skips that feature for API calls:
http://www.directadmin.com/features.php?id=1022

Also, it looks like the post might have been made over a GET request instead of a POST, which would explain why we're not seeing the POSTed data. Both GET and POST are allowed to be used, both will work, but I personally recommending using POST to post data (out of personal preference). I've added a get version of the debug output in the code now, available for the next release of DA. If the above version update to 1.34.1 does not resolve the issue, then let me know I can compile you a set of the new binaries with this extra bit of code to see exactly what GET value is being passed.

John
 
mm I have problem when I tried to update DA.

Code:
This is an automated message notifying you that the DirectAdmin software has been successfully updated.

To view what has changed, please visit:

http://www.directadmin.com/versions.php

In my info:

Current Version 1.34.0
New Version 1.341000


...Over all, I try to create an account from WHMCS but the error is showing again.
 
Hello,

Likely, DirectAdmin needs a restart. Try a brute force restart, just to be sure:
Code:
cd /usr/local/directadmin
killall -9 directadmin
./directadmin d
to ensure it's definately restarted.

If not, do a manual update:
http://help.directadmin.com/item.php?id=29

and failing that, send us an email.

Without the restart, the 1.34.0 version would be loaded, and the force_hostname change wouldn't yet take effect.

John
 
Ok, send us an email with your OS version and licensed ID and I'll give you a set of the new binaries with the "get" output so we can see what's being passed.

John
 
problem again after upgrade to 1.345.

the problem is that WHMCS is used method GET to send values
 
Back
Top