No idea why it's not using localhost here. Any ideas?

[3] => Array
        (
            [http://::1/drupal7/admin/httprl-test?key=FOOO&id=httprl_BAR] => stdClass Object
                (
                    [url] => http://::1/drupal7/admin/httprl-test?key=FOOf&id=httprl_BAR
                    [request] => stdClass Object
                        (
                            [code] => -10049
                            [error] => Die angeforderte Adresse ist in diesem Kontext ungltig.
                        )

                    [status] => Connection not made.
                    [data] => 
                    [options] => Array
CommentFileSizeAuthor
#5 httprl-1420084-5-ipv6-to-ipv4.patch794 bytesmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Part of the issue is the bug #1420080: Settings form not shown that does not allow me to configure my servers IP address...

Additional to this PHP returns an IPv6 address for $_SERVER['SERVER_ADDR'], Apache is not configured for as I know. I believe the $_SERVER['SERVER_ADDR'] detection needs optimization. I have no idea how this can be fixed or what I may need to change in PHP to get this solved.

In general it would be more useful to set the default value for 'httprl_server_addr' to -1

hass’s picture

Version: 7.x-1.x-dev » 7.x-1.3
mikeytown2’s picture

Version: 7.x-1.3 » 7.x-1.x-dev

Your PHP is built with "--enable-ipv6" most likely.

Can you test this on your box?

if (defined('AF_INET6')) {
  echo "PHP was compiled with ipv6 <br />\n";
} 
else {
  echo "PHP was compiled without ipv6 <br />\n";
}

if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) {
  echo $_SERVER['SERVER_ADDR'] . " SERVER_ADDR is in IPv6 notation <br />\n";
  $ip_address = $_SERVER['SERVER_ADDR'];
  if (preg_match('/^::\d+.\d+.\d+.\d+$/', $ip_address)) {
    $ip_address = substr($ip_address, 2);
  }
  elseif ($_SERVER['SERVER_ADDR'] == '::1') {
    $ip_address = "127.0.0.1";
  }
  echo $ip_address . "<br />\n"
}
else {
  echo $_SERVER['SERVER_ADDR'] . " SERVER_ADDR is in IPv4 notation <br />\n";
}

echo gethostbyname($_SERVER['HTTP_HOST']) . "<br />\n";

http://php.net/sockets.constants

hass’s picture

PHP was compiled with ipv6 
::1 SERVER_ADDR is in IPv6 notation 
127.0.0.1
127.0.0.1
mikeytown2’s picture

Status: Active » Fixed
FileSize
794 bytes

This patch has been applied to 6.x & 7.x. This might fix the issue on #1420092: httprl_lock_release() not upgraded to D7

hass’s picture

It looks more like a clean exit than an exception. Can try tomorrow... Now its 3:30am - time to sleep :-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.