@LLPP65 opened this Issue on March 28th 2017

My email reports have an IP address for the host portion of the "Sent from" section at the top of the weekly email report. This causes all the logo and flag images in the report to be blank because the site that serves them is one of many virtual servers on the same IP address.

Sent from http://a.b.c.d/.

I am running the latest version of Piwik, 3.0.2.

@LLPP65 commented on March 28th 2017

Additional data point... The report contains an IP address instead of a host name when the report is sent as a scheduled job. If I manually trigger a report to be sent from the administration interface, then the report is correct and contains a proper host name as part of the "Sent from" URL.

@LLPP65 commented on March 28th 2017

Another data point. The "Sent from" uses the correct hostname un the URL for one server's reports and an IP address in the URL for another. Very confusing.

@LLPP65 commented on May 2nd 2017

This behaviour is still the same in 3.0.4

@dbapl commented on May 7th 2017

Same thing in update notifications:

Hello,

Some plugins you use have been updated on the Marketplace:

 * AOM 0.6.3

Click here to update your plugins now:
https://a.b.c.d/index.php?module=CorePluginsAdmin&action=plugins

Happy analysing!
@mattab commented on September 19th 2017 Member

Maybe we should check that the Piwik URL is found in the trusted_hosts and if not, default to use the trusted_hosts instead?

we'll also need to make sure it works when Piwik is installed in a sub-directory.

@tsteur commented on September 19th 2018 Member
@mattab commented on October 5th 2018 Member

Please reopen if you still experience the issue with the latest Matomo @LLPP65

@LLPP65 commented on October 9th 2018

My latest email reports still contain IP addresses instead of hostnames.

@tsteur commented on October 9th 2018 Member

Just to double check: That'S with 3.6.1? Would it be possible that we debug this issue on your system?

@LLPP65 commented on October 9th 2018

I’m on 3.6.0, I don’t see 3.6.1 available for download. For debugging, just let me know what I can send you and I will do it.

Thanks,
Len

On 9 Oct 2018, at 20:34, Thomas Steur <notifications@github.com> wrote:

Just to double check: That'S with 3.6.1? Would it be possible that we debug this issue on your system?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@mattab commented on October 9th 2018 Member

Would it be possible to send us SSH Access to the matomo server? You can email at matomo.org/contact
Thank you!

@LLPP65 commented on October 9th 2018

Sorry, that isn’t something I can do. If you let me know what you’d like to see (logs, config files, etc.) I can sanitize and send them.

On 9 Oct 2018, at 20:51, Matthieu Aubry <notifications@github.com> wrote:

Would it be possible to send us SSH Access to the matomo server? You can email at matomo.org/contact
Thank you!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@tsteur commented on October 9th 2018 Member

Sorry meant 3.6.0, 3.6.1 isn't out yet :)

Two things: I'm just seeing the fix will only apply if you delete your current stored Matomo URL. Any chance you can execute this SQL query and check if the error persists?

delete from piwik_option where option_name = 'piwikUrl';

Your table prefix may differ from piwik_.

If it then still uses the wrong URL, and in case you are familiar with PHP/Server could you maybe just for one request apply this file change send us the output of this (make sure to remove the added lines after testing):

diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index bfd4ab4aeb..616a98cd01 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -177,6 +177,12 @@ class SettingsPiwik
      */
     public static function getPiwikUrl()
     {
+        $currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());
+        $test = Url::getHostFromUrl($currentUrl);
+        var_export('host: ' . $test);
+        var_export($_SERVER);
+        exit;
+
         $url = Option::get(self::OPTION_PIWIK_URL);

         $isPiwikCoreDispatching = defined('PIWIK_ENABLE_DISPATCH') && PIWIK_ENABLE_DISPATCH;
@@ -189,8 +195,6 @@ class SettingsPiwik
             return $url;
         }

-        $currentUrl = Common::sanitizeInputValue(Url::getCurrentUrlWithoutFileName());
-
         // when script is called from /misc/cron/archive.php, Piwik URL is /index.php
         $currentUrl = str_replace("/misc/cron", "", $currentUrl);
@tsteur commented on October 9th 2018 Member

Feel free to anonymize sensitive information from $_SERVER

Powered by GitHub Issue Mirror