WordPress.org

Ready to get started?Download WordPress

Forums

WP-Piwik
[resolved] Piwik did not answer HELP (25 posts)

  1. jiteshpatel
    Member
    Posted 2 years ago #

    I keep getting this error and i am not sure what i have done work

    Piwik did not answer. Please check your entered Piwik URL

    so i have the following url's and tokens

    http://www.launchm.co.uk/analytics/
    http://analytics.launchm.co.uk

    Token = [mod: removed token]

    TEST RESULTS:
    ____________________________________________________________________________________
    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Call: http://www.launchm.co.uk/analytics/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:

    Time: 3s

    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Call: http://www.launchm.co.uk/analytics/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.launchm.co.uk&format=XML&token_auth= + TOKEN
    Result:

    Time: 3s
    ___________________________________________________________________________________

    Both domains do not work, can someone help me. i am using the token from the API section and have not data in piwik for this site yet

    http://wordpress.org/extend/plugins/wp-piwik/

  2. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    FIRST OF ALL: Please remove your auth token here. It allows everybody to access your Piwik installation.

    Maybe there are limitations in your .htaccess (Piwik directory)?

    Examples: User agent filter (to disallow bots), IP filter (no access from localhost)

    What does WP-Piwik say about fopen and cURL?

  3. jiteshpatel
    Member
    Posted 2 years ago #

    i do apologise for this mistake

    i have checked the .htaccess and there is nothing in the file, it is blank.

    # BEGIN WordPress

    # END WordPress

    Either allow_url_fopen has to be enabled or cURL has to be available:

    cURL is available.
    allow_url_fopen is enabled.

    What should i do now?

  4. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    You posted your WordPress .htaccess, not your Piwik .htaccess.

    Check also your Apache settings (e.g. the Piwik installations vhost.conf).

    Maybe you are using a service like the firewall explained here: http://wordpress.org/support/topic/plugin-wp-piwik-nothing-showing-on-dashboard?replies=4

  5. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    By the way: Your auth token is still shown above. Remove it to keep your Piwik secure (or... better way: Create a new token!) ;-)

  6. jiteshpatel
    Member
    Posted 2 years ago #

    How do i edit my orignal post?

    and i can not find the 2 fiels you mentioned. the piwik domain i have created has no htaccess file in it. and where is the vhost.conf file located

  7. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    Hmmm... I have no idea how to edit your post. I'm sure this was possible in the past. Just renew your auth token - it's the most secure way.

    "vhost.conf" was an example file name. It depends on your configuration. Have a look in your Apache config - maybe "/etc/apache2/sites-enabled" contains useful information.

    For any reason your server seems to not respond to a request by itself.

    I'm working on a new version also using the PHP API instead of the HTTP API, but currently I can't tell you when it's done :/

  8. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    (Obviously it is only possible to edit "fresh" posts as I see.)

  9. jiteshpatel
    Member
    Posted 2 years ago #

    I do not have access to apache on my web hosting, not sure why

    how can i reset my token???

  10. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    To change your auth token, just change your password: http://forum.piwik.org/read.php?2,76900

    Did you upgrade to Piwik 1.8.2 just before the error appears?

  11. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    If you can't access your Apache config, maybe you can access your error logs?

  12. Goran Gligorin
    Member
    Posted 2 years ago #

    Hi!

    I've been playing around with this and ran the test script. Test 2/2 failed and returned a 403 with a 404. I put the link that test was calling into the browser and got the same result, but when I deleted the preceding http:// from the url argument it worked.

    I then changed every occurrence of:
    get_bloginfo('url')
    with:
    str_replace('http://', '', get_bloginfo('url'))
    and it did the trick.

    I know this is a temporary hack, but I might give you a clue in what's wrong. To me, it seems like a change in arguments to Piwik API. Hope you fix this error soon.

    Bye,
    gligoran

  13. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    Hi gligoran,

    first of all: Thanks for debugging!

    What does "a 403 with a 404" mean? Did your server return 403 (Forbidden) or 404 (Not Found)?

    I don't think Piwik arguments changed, because...

    1. in most cases it works fine without removing the HTTP.
    2. Piwik handles URL differences very well (e.g. additional slashes) normally.
    3. Piwik would return an error result instead of "Forbidden" or "Not Found".

    But I'll have a look at this and I'll try your change to check its impact, maybe I get a hint.

    Are you using a firewall service like this? http://wordpress.org/support/topic/plugin-wp-piwik-nothing-showing-on-dashboard?replies=4 Maybe your server does not allow a "http" in a parameter string?

  14. Goran Gligorin
    Member
    Posted 2 years ago #

    403 with a 404 means that the server returned 403, but said some 404 occurred as well. The first time I saw it too, thought it might mean something.

    Anyway, after posting this I noticed that even the Piwik's own JS tracking code isn't working properly. So I posted this: http://forum.piwik.org/read.php?2,90097,90121. Apparently my hosting provider (HostGator) has mod_security enabled, which rejects http:// in the links with a 403 error. I haven't yet figured out how to bypass this, but will post here, when I do. This means that neither WP-Piwik or Piwik itself aren't to blame, but it also means that a lot of people will have problems, as HostGator is one of the biggest hosts around.

  15. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    Just try the "avoid mod_security" option in WP-Piwik. This should work for your case.

    To solve your problem for all of your sites, mod_security allows you to create a whitelist. I have no further information on this, but I know about some HostGator users who work with such a whitelist and Piwik successfully.

  16. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    @ jiteshpatel: Are you using mod_security, too? Can you also try to enable "avoid mod_security"?

  17. jiteshpatel
    Member
    Posted 2 years ago #

    I have tired all options, even reinstalling piwik, mod_security off, no http:// before the url. nothing

    what options do i have left now?

  18. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    Can you ask your host to check your Apache log files? Maybe they have an idea why Piwik does not answer WP-Piwik HTTP requests.

    Did you try to use the PHP API? Enable PHP API, enter your auth token, your Piwik's URL and your Piwik's server path (see your host's documentation if you are not sure about this) - so WP-Piwik has not to communicate via HTTP requests.

    Otherwise enabling Piwik debugging may give you a hint: http://piwik.org/faq/troubleshooting/#faq_115

  19. jiteshpatel
    Member
    Posted 2 years ago #

    this is what happens

    [Wed Jun 20 15:41:16 2012] [error] [client 212.11.90.3] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'custom_admin_footer' not found or invalid function name in /home/sites/launchm.co.uk/public_html/wp-includes/plugin.php on line 170, referer: http://www.launchm.co.uk/wp-admin/options-general.php?page=wp-piwik/wp-piwik.php&tab=piwik

  20. jiteshpatel
    Member
    Posted 2 years ago #

    the PHP API, i enter the url but i jsut does nothing once i save it

  21. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    You have to enter your Piwik URL in the URL field (REST API, as before) and your path in the PHP API field.

    I'll look after the error you posted, but this is regarding to WP-Piwik and/or WordPress.

    You should look after an error regarding Piwik, logged while running WP-Piwik's test script. The error should appear e.g. on WP-Piwik's request of http://www.launchm.co.uk/analytics/?module=API&... You have to find out why Piwik does not answer to WP-Piwik requests.

  22. jiteshpatel
    Member
    Posted 2 years ago #

    Hi

    I did not get anything in the error log at all went running the script, but got this on the script

    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Call: analytics.launchm.co.uk/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:
    
    Time: 3s
    
    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Call: analytics.launchm.co.uk/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.launchm.co.uk&format=XML&token_auth= + TOKEN
    Result:
    
    Time: 3s

    You have to enter your Piwik URL in the URL field (REST API, as before) and your path in the PHP API field.

    My url is http://analytics.launchm.co.uk/ but what is my php api path?

  23. braekling
    Member
    Plugin Author

    Posted 2 years ago #

    - What's about your access log? Maybe Piwik does not answer because of a blacklist tool like this http://wordpress.org/support/topic/plugin-wp-piwik-not-working-with-5g-blacklist?replies=2

    - The Piwik path is Piwik's path on your server. It depends on your server's or host's configuration. You can also use a relative path, e.g. if your blog is at /www/blog and your Piwik at /www/analytics, you can try "../analytics". (Your earlier test script output looks like analytics is a sub directory in your blog's directory, so "./analytics" should work, if you didn't change the path to switch to the subdomain.)

  24. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    Did you get this working?

  25. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    WP-Piwik 0.9.6 allows to change the User Agent. This should help to fix most blacklist problems. It also allows to disable SSL peer verification and contains a new test script also showing the response headers.

    This should help to solve your issue (or get behind its cause. Otherwise please post again containing the new test script's output.

    WP-Piwik 0.9.6 will be released soon.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.