Jump to content
  • 0

Domain Always Not Available To Register


1983ltd

Question

I think I asked you guys about this in early V3....

 

Still having the same problems.

 

Using Namescheap API NOT in sandbox mode.

 

See attached...

 

No matter what domain is attempted to be registered they are ALWAYS returned as not available for registration. No logs are kept after it does a whois so not sure if its using the API to look up the domain availability or not??

 

Also clicking on 'Check availability' hangs the browser for around 60-80 seconds or more before the Not Available page displays!!!!!

post-2347-0-71719400-1380841673_thumb.pn

post-2347-0-70919500-1380841905_thumb.pn

Link to comment
Share on other sites

Recommended Posts

  • 0

Absolutely no change. Module log is empty as well.

 

I did something similar to what Tyson said and just did a var_dump($response); right after the curl.  My problem was that my server's ip that was doing the curl request was different from the shared ip that my site was on and I was getting an ip rejected error.

 

On that same note, that would be a nice thing to see in the module log in the admin.

Link to comment
Share on other sites

  • 0

Then it sounds like an OK response was not received from the API, or was not handled.

 

You can update /components/modules/namecheap/apis/namecheap_api.php (line 99):

$response = curl_exec($ch);

 

to:

$response = curl_exec($ch);
if ($response === false)
	echo "ERROR: " . curl_error($ch);

And try checking the availability of a domain again. If you receive an error regarding a hostname unable to resolve, this is likely a DNS configuration issue with your server related to cURL requests.

 

 

Did that change as well. Nothing changes. the domain is still not available, no other error shows up anywhere. Even combined it with the previous recommended modification, still no change. To clarify myself, I did not receive an error regarding hostnames unable to resolve.

 

Forcing curl to use only ipv4 for the resolution (curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); above line 99 namecheap api file) takes a couple of seconds longer then comes back with domain not available.

 

Running a packet capture on the WAN side (upstream router) (yes I have both the authority and ability for that :P) shows traffic bouncing back and forth between api.namecheap.com's ip and my server, when checking the domain's availability, which is to be expected. That means that the DNS resolution works, something is not working right elsewhere though.

Link to comment
Share on other sites

  • 0

Interesting... I wonder what response Blesta is receiving.

 

The last check would be to update /components/modules/namecheap/namecheap.php (line 1168):

$result = $domains->check(array('DomainList' => $domain));

if ($result->status() != "OK")
	return false;

 

to

$result = $domains->check(array('DomainList' => $domain));
var_dump($result);

if ($result->status() != "OK")
	return false;

 

Surely something must appear after you attempt to check a domain's availability.

Link to comment
Share on other sites

  • 0

Editing /apis/namecheap_api.php (in the above mentioned lines)

 

 

99.       $response = curl_exec($ch);
100.        var_dump($response);
101.        curl_close($ch);

gives this on the top of the page:

string(372) " Parameter APIUser is missing API01 --4:00 0 "

 

I have set up the correct user for the API on the module manage page. Will try the other modifications and report back

 

EDIT: yeap, apiuser is missing again:

string(376) " Parameter APIUser is missing API02 --4:00 0.009 " object(NamecheapResponse)#171 (2) { ["xml":"NamecheapResponse":private]=> object(SimpleXMLElement)#172 (7) { ["@attributes"]=> array(1) { ["Status"]=> string(5) "ERROR" } ["Errors"]=> object(SimpleXMLElement)#173 (1) { ["Error"]=> string(28) "Parameter APIUser is missing" } ["Warnings"]=> object(SimpleXMLElement)#174 (0) { } ["RequestedCommand"]=> object(SimpleXMLElement)#175 (0) { } ["Server"]=> string(5) "API02" ["GMTTimeDifference"]=> string(6) "--4:00" ["ExecutionTime"]=> string(5) "0.009" } ["raw":"NamecheapResponse":private]=> string(376) " Parameter APIUser is missing API02 --4:00 0.009 " }

 

 

EDIT: strange, I thought that the response should be the same with the first mentioned modification. When I did that modification, I carefully went over the entire page but did not notice anything. Redoing the first modification now gives the same apiuser missing ?!?!?!

string(372) " Parameter APIUser is missing API02 --4:00 0 "

 

EDIT2: removing all modifications now gives the same apiuser missing error on check availability. Dunno what made it change it's mind and display that error now

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...