Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIP variable is not parsed correctly #10227

Closed
ronaldvdmeer opened this issue Jun 13, 2016 · 5 comments
Closed

CIP variable is not parsed correctly #10227

ronaldvdmeer opened this issue Jun 13, 2016 · 5 comments
Labels
answered For when a question was asked and we referred to forum or answered it. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Milestone

Comments

@ronaldvdmeer
Copy link

ronaldvdmeer commented Jun 13, 2016

It seems like when using the PHP API the IP (cip variable) is not correctly parsed in PIWIK (version: 2.16.1). The token is from a user with administrator privileges for that specific site.

Log entry of apache on piwik server

**149.210.175.14** - - [13/Jun/2016:16:58:33 +0200] "GET /piwik.php?
idsite=8&rec=1&apiv=1&r=931302&cip=**80.64.22.145**&token_auth=XXXXXXXXX&_idts=1465819516
&_idvc=48&_id=c2d888b3c72a4775&url=https%3A%2F%2Fwww.example.com%2F&urlref=&action_na
me=Example+%7C+Piwik HTTP/1.1" 200 215 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36"

PHP code used

function htmlTitle($data) {
  require "assets/php/piwik-php-tracker.php";
  $t = new \PiwikTracker( 2, 'http://piwik.externaldomain.com');
  $t->setTokenAuth('XXXXXXXXX');
  $t->setIp($_SERVER['REMOTE_ADDR']);
  $t->doTrackPageView("$data");
  return $data;
}

The correct IP is 80.64.22.145 but PIWIK interface shows 149.210.175.14.

@ronaldvdmeer ronaldvdmeer changed the title CIP IP is not parsed correctly in PIWIK CIP variable is not parsed correctly Jun 13, 2016
@sgiehl
Copy link
Member

sgiehl commented Jun 13, 2016 via email

@ronaldvdmeer
Copy link
Author

ronaldvdmeer commented Jun 13, 2016

Yes. The token used is from a user with administrator privileges for that specific site.

By the way:
Even without specifically setting the setIp option this problem exists.
Apache log show that the CIP variable is set correctly but PIWIK seems to ignoring it.

@mattab
Copy link
Member

mattab commented Jul 8, 2016

Hi @rvmp

Here is what to do:

@mattab mattab added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Jul 8, 2016
@mattab
Copy link
Member

mattab commented Jul 14, 2016

@rvmp please let us know if you can reproduce the issue and the debug output, we'd like to help solve this bug if it's confirmed 👍

@mattab mattab added this to the 2.16.x (LTS) milestone Jul 14, 2016
@mattab
Copy link
Member

mattab commented Aug 23, 2016

As we have not heard from you, closing the issue. Feel free to comment and re-open if you still experience the issue and have more info.

@mattab mattab closed this as completed Aug 23, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users.
Projects
None yet
Development

No branches or pull requests

3 participants