Hi, after installing this module in a shared hosting environment, I am receiving this error. The strange thing is that it was working on local, then first was working on shared, then both local and shared began giving these errors, almost as if something had changed in the code...

Comments

dj1999’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new2.09 KB

Hi,

here is a patch to help if get back empty result.

Regards,
Joe

jake1000’s picture

StatusFileSize
new98.81 KB

Patch results in the same error. Screenshot attached. Also, the website searched for is an existing website, so there should be results returned.

jake1000’s picture

StatusFileSize
new43.64 KB

I just changed line 152 to this:

if (isset($variables['result']) && isset($variables['result']['regrinfo']['domain']['name'])) {

and now I am getting the following issue shown in the attachment on shared hosting environment, only after running a few URL's through. You will notice there was a URL that needed normalizing that was ran before these empty results appeared. Also, sometimes the output_text doesn't appear, and sometimes the drupal_set_message will disappear or in the function "domain_finder_normalize_domain_name" the message will appear twice when searching for multiple different URL's in a row.

jake1000’s picture

StatusFileSize
new57.18 KB

Here are the missing messages

jake1000’s picture

StatusFileSize
new83.12 KB

messages showing up twice when entering differently formatted URL's.

dj1999’s picture

StatusFileSize
new45.84 KB

Sorry I could not reproduce empty whois result with your settings.

I made some changes please test this tree or use git clone --recursive --branch 7.x-1.x-dev http://git.drupal.org/project/domain_finder.git

I waiting for your results.
Regards,
Joe

jake1000’s picture

StatusFileSize
new58.5 KB

The new code results in the following error. It seems that these errors with the patched code from last time were only happening after entering "www."

If you don't enter the prefix, there are no errors so the www. is breaking it.

dj1999’s picture

StatusFileSize
new709 bytes

Here a patch to help it. What is with empty whois result?

jake1000’s picture

StatusFileSize
new106.98 KB

The new code provides a new message that there are empty results... but for most of these there should be results returned. In the attachment, www.yahoo.com was searched for and returned empty results. The problem is with the "www." prefix. The code is not stripping the prefix correctly. When that is fixed, the empty result problem will go away.

jake1000’s picture

StatusFileSize
new600.6 KB

Another error with new tree and code.

dj1999’s picture

StatusFileSize
new66.85 KB
new61.78 KB

I do not know. I have ran your searches same settings and I got the properly result. See pictures.
Search www.
Search www.yahoo.com

jake1000’s picture

I don't know what to say then. When you search without including the www. prefix, the code works fine. When you start to enter www., then it breaks down. I think your function "domain_finder_normalize_domain_name" is not correctly written.

dj1999’s picture

StatusFileSize
new16.09 KB

But if you see my results what search just "www." and "www.yahoo.co" working properly too.

I think your function "domain_finder_normalize_domain_name" is not correctly written.

It is easy to test it.
test normalize name

jake1000’s picture

You're right. Could it be an issue with shared hosting env?

jake1000’s picture

StatusFileSize
new105.6 KB

One more screenshot for you to take a look at. Why would it return that yahoo.org is free?

dj1999’s picture

StatusFileSize
new14.87 KB

I do not know. I get always right result. I use phpWhois version 4.2.2 Jul-09-2011. Check your phpWhois version please.

dj1999’s picture

Status: Patch (to be ported) » Needs review
jake1000’s picture

Okay, I installed the module on a fresh install and just like before, it worked for awhile, with the exception of the .org domain showing as free (in the screenshot below), but now it is returning all empty results only in the shared hosting environment. I ran about 20 different URLs through in a row before the empty results began coming up for every entry. Could it be a caching issue?

jake1000’s picture

StatusFileSize
new87.41 KB
dj1999’s picture

StatusFileSize
new1.45 KB

Because I get correct results is to difficult to help but created a patch. Now default is 'unavailable'. On case is free if registered value is 'no'. Please test it.

jake1000’s picture

Same result with the patch. There must be something with the shared hosting environment that is causing it. Like I said, it works for a few searches on a fresh install before the empty results start appearing in shared hosting, local works fine. I guess it's just not going to work for me. Thanks for trying to help.

edit: The double messages in attachment from comment #5 are not appearing any more with the changed values in the last patch.

dj1999’s picture

Status: Needs review » Fixed

I think our bugs are repaired. Hosting is an other question.

dj1999’s picture

Status: Fixed » Closed (fixed)