Title: Unexplained path and token errors
Last modified: August 24, 2016

---

# Unexplained path and token errors

 *  Resolved [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/)
 * I installed wp-piwik and it has never worked. I believe I’m doing everything 
   correctly, yet, on the Main Settings Page for the plugin, I get this:
 * >  Thanks for using WP-Piwik!
   >  An error occured: Unknown site/blog. [Support]
   > Auto site configuration is enabled. Tracking code insertion is disabled.
 * Then on the settings page, I get:
 * > An error occured: Please check URL and auth token. You need at least view access
   > to one site. [Support]
 * The path to piwik is correct. The auth token is the one found in the API section
   under my username in the piwik admin area.
 * I have no idea why it isn’t working.
 * Any help?
 * [https://wordpress.org/plugins/wp-piwik/](https://wordpress.org/plugins/wp-piwik/)

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969015)
 * I also ran the debug and got the following response:
 * > *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
   >  Using: cURL SSL
   > peer verification: enabled User Agent: WP-Piwik Call: [http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth=](http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth=)
   > + TOKEN Result:
   > Time: 0s
   > *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
   >  Using: cURL SSL peer 
   > verification: enabled User Agent: WP-Piwik Call: [http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.mywebsite.com%2Fwordpress&format=XML&token_auth=](http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.mywebsite.com%2Fwordpress&format=XML&token_auth=)
   > + TOKEN Result:
 * And when I click on “Get site configuration details”, It brings me to a page 
   that lists my site, with a link under site ID that says Create Piwik Site.
 * *edit* When I click the link to create the site, it refreshes the page, and does
   nothing from what I can see.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969018)
 * Can you please run the test script and post it’s output here?
    (Please put the
   output code into backticks to mark it as code.)
 * You can find the test script here: WP-Piwik Settings -> Support -> Run test script.
 * Thank you very much!
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969025)
 * I thought I just posted that?
 *     ```
       *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
       Using: cURL
       SSL peer verification: enabled
       User Agent: WP-Piwik
       Call: http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
       Result:
   
       Time: 0s
   
       *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
       Using: cURL
       SSL peer verification: enabled
       User Agent: WP-Piwik
       Call: http://www.mywebsite.com/piwik_analytics/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Fwww.mywebsite.com%2Fwordpress&format=XML&token_auth= + TOKEN
       Result:
       ```
   
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969035)
 * I also ran this url that you suggested in another support thread:
 *     ```
       http://YOUR_PIWIK_URL/index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess&format=Html&token_auth=YOUR_AUTH_TOKEN
       ```
   
 * and got the result:
 *     ```
       Value
       1
       3
       ```
   
 * Don’t know if helps, just thought I’d give as much info as I could.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969037)
 * The test script shows that your Piwik server does not accept the request (no 
   answer, no status code response, call immediately blocked – 0s).
 * Are you using mod_security? In this case you have to whitelist your wordpress
   server. (E.g., Host Gator is using this as standard configuration.)
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969040)
 * I have no idea. I’m trying to set this up for a friend that is running his site
   on a crappy free host.
 * How would add the server to the whitelist?
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969048)
 * In this case you should contact the host’s support. I have no idea if they are
   using mod_security… and if so, maybe you need the support’s help to whitelist
   a domain. Sorry!
 * Maybe this information will help:
 * _WP-Piwik is a WordPress plugin which connects to Piwik using a REST API (http://
   calls). For any reason, Piwik is not answering to these requests (no http status
   code, no response – the server seems to ignore the request). Possible reason:
   mod\_security. In this case, the WordPress server has to be added to the Piwik
   server’s whitelist (or localhost has to be added to the whitelist, if WordPress
   and Piwik are running on the same server)._
 * A second idea: If both (Piwik and WordPress) are running on the same server and
   you know the absolute server path to Piwik (e.g., /var/www/customer12345/piwik/),
   you can use the PHP API instead of the REST API.
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969054)
 * Ok, thanks. There is no support for free accounts on this host, so no luck there.
   I think I’ll play around with the absolute path and see if I can guess what it
   is.
 * Wish me luck!
 * And thank you for such great service and prompt responses. This is _BY FAR_ the
   best support I’ve gotten on a plugin.
 * Thanks again! Will be rating 5 stars when I get it working, and actually use 
   it.
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969068)
 * You are welcome! 🙂
 * Please tell me if you can figure out how to get it working. This issue (no response)
   occurs very often, so every hint would be very helpful.
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969185)
 * Got it working!
    I ended up using the server path. The host is byethost.com using
   the free account. I also have no way of knowing if they use mod_security, so 
   no help there.
 * For future reference, the home directory can be found in the cpanel sidebar towards
   the bottom. Mine ended up looking like this:
    /home/volx_x/byethost5.com/<yourusername
   >
 * Since the directory you access in ftp or the file manager in cpanel is htdocs,
   and I installed piwik into that folder, I appended /htdocs/piwik to the end of
   the home directory. So my final directory that got piwik working was this:
 * /home/volx_x/byethost5.com/<myusername>/htdocs/piwik
 * Voila, wp-piwik no longer threw the error.
 * Just as an aside, when the page tried to refresh itself, it gave raw html no 
   matter how many times I manually refreshed. I had to go back to the wordpress
   admin and re-enter into the wp-piwik settings. Not a big deal, but kinda freaky
   for someone who might not know what to do if it happened to them
 *  Plugin Author [braekling](https://wordpress.org/support/users/braekling/)
 * (@braekling)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969187)
 * Thank you very much!
 * If you update to 0.9.9.16 the plain html issue should be fixed. 🙂
 *  Thread Starter [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * (@skunkgrunt)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969208)
 * Fantastic! I’m going to play around with it tonight and leave a rating.
 * Thanks again for all the help.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Unexplained path and token errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-piwik/assets/icon-256x256.png?rev=3529668)
 * [Connect Matomo - Analytics Dashboard for WordPress](https://wordpress.org/plugins/wp-piwik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-piwik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-piwik/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-piwik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-piwik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-piwik/reviews/)

## Tags

 * [auth](https://wordpress.org/support/topic-tag/auth/)
 * [path](https://wordpress.org/support/topic-tag/path/)
 * [piwik](https://wordpress.org/support/topic-tag/piwik/)

 * 12 replies
 * 2 participants
 * Last reply from: [skunkgrunt](https://wordpress.org/support/users/skunkgrunt/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/unexplained-path-and-token-errors/#post-5969208)
 * Status: resolved