Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-01-16 02:30:32 +0300
committervipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-01-16 02:30:32 +0300
commitefaf1e3ad485b79a7990718269c1da91d174eb95 (patch)
tree161e2b275648eb2aa7274cf59dc0bcfc9bfcc907 /plugins/Installation
parentc569dc4c6a8953bbd7692a6be5fe89f125a51365 (diff)
fixes #1110 - warn if IPv6 address detected during Installation; handle IPv4 mapped addresses
Diffstat (limited to 'plugins/Installation')
-rw-r--r--plugins/Installation/Controller.php9
-rw-r--r--plugins/Installation/templates/systemCheck.tpl6
2 files changed, 15 insertions, 0 deletions
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 3d97644f63..73b0fa5d9e 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -744,6 +744,15 @@ class Piwik_Installation_Controller extends Piwik_Controller
}
}
+ /**
+ * @see http://php.net/ip2long
+ */
+ $infos['isIpv4'] = true;
+ if(strpos($_SERVER['REMOTE_ADDR'], ':') !== false)
+ {
+ $infos['isIpv4'] = false;
+ }
+
$infos['serverVersion'] = addslashes($_SERVER['SERVER_SOFTWARE']);
$infos['serverOs'] = @php_uname();
$infos['serverTime'] = date('H:i:s');
diff --git a/plugins/Installation/templates/systemCheck.tpl b/plugins/Installation/templates/systemCheck.tpl
index 00a22c0f7c..8c819eb647 100644
--- a/plugins/Installation/templates/systemCheck.tpl
+++ b/plugins/Installation/templates/systemCheck.tpl
@@ -209,6 +209,12 @@
{if $infos.protocol_ok}{$ok}{else}{$warning} {$infos.protocol}<br /><i>{'Installation_SystemCheckProtocolHelp'|translate}</i><br /><br /><code>[General]</code><br /><code>reverse_proxy = 1</code><br />{/if}
</td>
</tr>
+ <tr>
+ <td class="label">{'Installation_SystemCheckIpv4'|translate}</td>
+ <td>
+ {if $infos.isIpv4}{$ok}{else}{$warning}<br /><i>{'Installation_SystemCheckIpv4Help'|translate}</i>{/if}
+ </td>
+ </tr>
</table>
{include file="Installation/templates/integrityDetails.tpl"}