SimpleTest vs IPv6

5th Aug 2010 // By Alexander // Drupal Planet

We had a problem in the office the other day, and one that took days to figure out. The problem we currently is, even though it works fine now, we don't actually know WHY it works (there's a great little comic strip explaining our situation on Geek and Poke).

On my local machine, I had written some test for the Creative Message Social module - Facebook OAuth to be precise - which would pass or fail depending on which domain I was using.

To explain this in more detail, it seemed that drupalGet, when run from a virtual host domain, such as http://local.cm7/tiger-dev.co.uk/, would return zero bytes, and an HTTP status code of zero, also.
However, if run from the default Drupal site on http://localhost/, drupalGet would work fine.

After many gruelling hours trying to figure out the problem using various trial and error methods (including one fresh install of the operating system), I eventually found the solution lay in my hosts file.
I was using IPv6 notation for all domains pointing to the local installation of Apache, and as soon as I added extra entries for IPv4, drupalGet started working like magic again!

 

::1          local.cm7.tiger-dev.co.uk
# As soon as the following line was added to
# /etc/hosts, drupalGet works!
127.0.0.1    local.cm7.tiger-dev.co.uk

 

Has anyone else had hair-tearingly awful experiences, only to find that it really WAS that simple?

About The Author

Alexander's Profile Picture
2

Comments

Jamie's picture

Every day! Yesterday it was a client's Drupal not sending out user registration emails. I was going crazy trying to figure it out. mail() worked fine, but not Drupal. Well it turned out they had the SMTP library in there at one point. They never deleted the module or uninstalled it, just activated it. It was trying to use a defunct SMTP server to send stuff. Uninstalled it and everything worked great again! Of course it took about an hour to track down the obscure little problem.

Nicolas's picture

We had a problem on certain elements on forms. When no description for the field was added, the word "asset" appeared. And this everywhere. I looked for it in code. Searched a long time, to find out someone translated the empty string to the word "asset"... Frustrating !

Post new comment

The content of this field is kept private and will not be shown publicly.

New job vacancies button

Categories

Search