• Resolved dan.abillon

    (@danabillon)


    First time installing piwik on our sites to get traffic data but all of the sudden we get this kind of error.

    We tested this on our two sites which nets similar errors
    They are under our dedicated Server

    Here is the test script log coming from our domain under our dedicated server
    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: http://www.taxcreditexperts.co.uk/piwik/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 200 OK
    Date: Thu, 23 Apr 2015 07:23:16 GMT
    Content-Type: text/xml; charset=utf-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    Set-Cookie: __cfduid=dfdfe3a971e6e6816af5f795107a012d61429773796; expires=Fri, 22-Apr-16 07:23:16 GMT; path=/; domain=.taxcreditexperts.co.uk; HttpOnly
    Vary: Accept-Encoding,User-Agent
    Server: cloudflare-nginx
    CF-RAY: 1db7d271e67d0106-DFW

    <?xml version=”1.0″ encoding=”utf-8″ ?>
    <result>
    <row>
    <idsite>1</idsite>
    <name>Tax Credit Experts EM</name>
    <main_url>http://rndtaxexpertsem.co.uk</main_url&gt;
    <ts_created>2015-04-22 14:34:54</ts_created>
    <ecommerce>0</ecommerce>
    <sitesearch>1</sitesearch>
    <sitesearch_keyword_parameters />
    <sitesearch_category_parameters />
    <timezone>Europe/London</timezone>
    <currency>USD</currency>
    <excluded_ips />
    <excluded_parameters />
    <excluded_user_agents />
    <group />
    <type>website</type>
    <keep_url_fragment>0</keep_url_fragment>
    </row>
    <row>
    <idsite>2</idsite>
    <name>Tax Credit Experts WM</name>
    <main_url>http://rndtaxexpertswm.co.uk</main_url&gt;
    <ts_created>2015-04-22 14:49:31</ts_created>
    <ecommerce>0</ecommerce>
    <sitesearch>1</sitesearch>
    <sitesearch_keyword_parameters />
    <sitesearch_category_parameters />
    <timezone>Europe/London</timezone>
    <currency>USD</currency>
    <excluded_ips />
    <excluded_parameters />
    <excluded_user_agents />
    <group />
    <type>website</type>
    <keep_url_fragment>0</keep_url_fragment>
    </row>
    </result>
    Time: 0.54s

    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: http://www.taxcreditexperts.co.uk/piwik/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Frndtaxexpertsem.co.uk&format=XML&token_auth= + TOKEN
    Result:
    HTTP/1.1 403 Forbidden
    Date: Thu, 23 Apr 2015 07:23:16 GMT
    Content-Type: text/html
    Transfer-Encoding: chunked
    Connection: keep-alive
    Set-Cookie: __cfduid=d39d3f48d7013f29cce974fe9ff09345f1429773796; expires=Fri, 22-Apr-16 07:23:16 GMT; path=/; domain=.taxcreditexperts.co.uk; HttpOnly
    Last-Modified: Mon, 11 Nov 2013 05:39:10 GMT
    Server: cloudflare-nginx
    CF-RAY: 1db7d27543e703e8-DFW

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml&#8221; xml:lang=”en” lang=”en”>
    <head profile=”http://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/>
    <title>403 – FORBIDDEN</title>

    <script type=”text/javascript”>
    //<![CDATA[
    try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:0,owlid:”cf”,bag2:1,mirage2:0,oracle:0,paths:{cloudflare:”/cdn-cgi/nexp/dok3v=1613a3a185/”},atok:”510d0f1146494340e196a47a53706296″,petok:”3cb34f6d402da7fcff7b5e8e876557def3ef305a-1429773796-1800″,zone:”taxcreditexperts.co.uk”,rocket:”a”,apps:{}}];document.write(‘<script type=”text/javascript” src=”//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=7e13c32551/cloudflare.min.js”><‘+’\/script>’);}}catch(e){};
    //]]>
    </script>
    <script data-rocketsrc=”http://code.jquery.com/jquery-1.9.1.js&#8221; type=”text/rocketscript”></script>
    <script data-rocketsrc=”/cgi-sys/js/simple-expand.min.js” type=”text/rocketscript”></script>
    <style type=”text/css”>body{padding:0;margin:0;font-family:helvetica;}#container{margin:20px auto;width:868px;}#container #top403{background-image:url(‘/cgi-sys/images/404top_w.jpg’);background-repeat:no-repeat;width:868px;height:168px;}#container #mid403{background-image:url(‘/cgi-sys/images/404mid.gif’);background-repeat:repeat-y;width:868px;}#container #mid403 #gatorbottom{position:relative;left:39px;float:left;}#container #mid403 #xxx{float:left;padding:30px 360px 10px;margin:auto auto -10px auto}#container #mid403 #content{float:left;text-align:center;width:868px;}#container #mid403 #content #errorcode{font-size:30px;font-weight:800;}#container #mid403 #content #banner{margin:20px 0 0;}#container #mid403 #content #hostedby{font-weight:800;font-size:25px;font-style:italic;margin:20px 0 0;}#container #mid403 #content #coupon{color:#AB0000;font-size:22px;font-style:italic;}#container #mid403 #content #getstarted a{color:#AB0000;font-size:31px;font-style:italic;font-weight:800;}#container #mid403 #content #getstarted{margin:0 0 35px;}#container #bottom403{background-image:url(‘/cgi-sys/images/404bottom.gif’);background-repeat:no-repeat;width:868px;height:14px;}#container #mid403 #content #faq_container{margin:5px 0 5px 0;padding:10px 0 10px 0;clear:both;}#container #mid403 #content #accordion{font-size:90%;width:650px;min-height:100px;margin:0 auto;text-align:center;}#container #mid403 #content #accordion ul{text-align:left;}#container #mid403 #content #accordion ol{text-align:left;}#container #mid403 #content #accordion li{font-size:90%;}#container #mid403 #content #accordion p{font-size:95%;text-align:left;}#container #mid403 #content #accordion h3{font-weight:bold;}#container #mid403 #content #accordion h4{font-weight:bold;font-style:italic;text-align:left;}.content{display:none;}.first{color:#ff6600;}.second{color:#3b5998;}.third{color:#198c19;}.code{background-color:#e5e5e5;border:2px solid #ede1d1;padding:5px 5px 5px 5px;text-align:left;}.shell{border:2px solid gray;background-color:black;color:white;text-align:left;}</style>
    </head>
    <body>
    <div id=”container”>
    <div id=”top403″></div>
    <div id=”mid403″>
    <div id=”xxx”><img src=”/cgi-sys/images/f.png” alt=””/></div>
    <div id=”content”>
    <div id=”errorcode”>ERROR 403 – FORBIDDEN</div>
    <div id=”faq_container”>
    <div id=”accordion”>
    <div id=”why”>
    <h3>Why am I seeing this page?</h3>
    <div class=”content”>
    <p>403 errors usually mean that the server does not have permission to view the requested file or resource.These errors are often caused by IP Deny rules, File protections, or permission problems.</p>
    <p>In many cases this is not an indication of an actual problem with the server itself but rather a problem with the information the server has been instructed to access as a result of the request. This error is often caused by an issue on your site which may require additional review by our support teams.</p>
    <p>Our support staff will be happy to assist you in resolving this issue. Please contact our Live Support or reply to any Tickets you may have received from our technicians for further assistance.</p>
    </div>
    </div>
    <div id=”what_to_do”>
    <h3>Is there anything that I can do?</h3>
    <div class=”content”>
    <p>There are a few common causes for this error code including problems with the individual script that may be executed upon request. Some of these are easier to spot and correct than others.</p>
    <h4><u>File and Directory Ownership</u></h4>
    <p>The server you are on runs applications in a very specific way in most cases. The server generally expects files and directories be owned by your specific user cPanel user. If you have made changes to the file ownership on your own through SSH please reset the Owner and Group appropriately.</p>
    <h4><u>File and Directory Permissions</u></h4>
    <p>The server you are on runs applications in a very specific way in most cases. The server generally expects files such as HTML, Images, and other media to have a permission mode of 644. The server also expects the permission mode on directories to be set to 755 in most cases.</p>
    <p>(See the Section on Understanding Filesystem Permissions.)</p>
    <p>Note: If the permissions are set to 000, please contact our support team using the ticket system. This may be related to an account level suspension as a result of abuse or a violation of our Terms of Service.</p>
    <h4><u>IP Deny Rules</u></h4>
    <p>In the .htaccess file, there may be rules that are conflicting with each other or that are not allowing an IP address access to the site.</p>
    <p>If you would like to check a specific rule in your .htaccess file you can comment that specific line in the .htaccess by adding # to the beginning of the line. You should always make a backup of this file before you start making changes.</p>
    <p>For example, if the .htaccess looks like</p>
    <div class=”code”>
    Order deny,allow
    allow from all
    deny from 192.168.1.5
    deny from 192.168.1.25
    </div>
    <p>Then try something like this</p>
    <div class=”code”>
    Order allow,deny
    allow from all
    #deny from 192.168.1.5
    deny from 192.168.1.25
    </div>
    <p>Our server administrators will be able to advise you on how to avoid this error if it is caused by process limitations. Please contact our Live Support or open a Ticket. Be sure to include the steps needed for our support staff to see the 403 error on your site.</p>
    </div>
    </div>
    <div id=”understand_perms”>
    <h3>Understanding Filesystem Permissions</h3>
    <div class=”content”>
    <h4><u>Symbolic Representation</u></h4>
    <p>The first character indicates the file type and is not related to permissions. The remaining nine characters are in three sets, each representing a class of permissions as three characters. The <span class=”first”>first set</span> represents the user class. The <span class=”second”>second set</span> represents the group class. The <span class=”third”>third set</span> represents the others class.</p>
    <p>Each of the three characters represent the read, write, and execute permissions:</p>

    • r if reading is permitted, if it is not.
    • w if writing is permitted, if it is not.
    • x if execution is permitted, if it is not.

    <p>The following are some examples of symbolic notation:</p>

    • -<span class=”first”>rwx</span><span class=”second”>r-x</span><span class=”third”>r-x</span> a regular file whose user class has full permissions and whose group and others classes have only the read and execute permissions.
    • c<span class=”first”>rw-</span><span class=”second”>rw-</span><span class=”third”>r–</span> a character special file whose user and group classes have the read and write permissions and whose others class has only the read permission.
    • d<span class=”first”>r-x</span><span class=”second”>—</span><span class=”third”>—</span> a directory whose user class has read and execute permissions and whose group and others classes have no permissions.

    <h4><u>Numeric Representation</u></h4>
    <p>Another method for representing permissions is an octal (base-8) notation as shown. This notation consists of at least three digits. Each of the three rightmost digits represents a different component of the permissions: <span class=”first”>user</span>, <span class=”second”>group</span>, and <span class=”third”>others</span>.</p>
    <p>Each of these digits is the sum of its component bits As a result, specific bits add to the sum as it is represented by a numeral:</p>

    • The read bit adds 4 to its total (in binary 100),
    • The write bit adds 2 to its total (in binary 010), and
    • The execute bit adds 1 to its total (in binary 001).

    <p>These values never produce ambiguous combinations. each sum represents a specific set of permissions. More technically, this is an octal representation of a bit field – each bit references a separate permission, and grouping 3 bits at a time in octal corresponds to grouping these permissions by <span class=”first”>user</span>, <span class=”second”>group</span>, and <span class=”third”>others</span>.</p>
    <p>Permission mode 0<span class=”first”>7</span><span class=”second”>5</span><span class=”third”>5</span></p>
    <dl class=”code”>
    <dt><span class=”first”>4+2+1=7</span>
    <dd>Read, Write, eXecute</dd>
    </dt>
    <dt><span class=”second”>4+1=5</span>
    <dd>Read, eXecute</dd>
    </dt>
    <dt><span class=”third”>4+1=5</span>
    <dd>Read, eXecute</dd>
    </dt>
    </dl>
    <p>Permission mode 0<span class=”first”>6</span><span class=”second”>4</span><span class=”third”>4</span></p>
    <dl class=”code”>
    <dt><span class=”first”>4+2=6</span>
    <dd>Read, Write</dd>
    </dt>
    <dt><span class=”second”>4</span>
    <dd>Read</dd>
    </dt>
    <dt><span class=”third”>4</span>
    <dd>Read</dd>
    </dt>
    </dl>
    </div>
    </div>
    <div id=”edit_access”>
    <h3>How to modify your .htaccess file</h3>
    <div class=”content”>
    <p>The .htaccess file contains directives (instructions) that tell the server how to behave in certain scenarios and directly affect how your website functions.</p>
    <p>Redirects and rewriting URLs are two very common directives found in a .htaccess file, and many scripts such as WordPress, Drupal, Joomla and Magento add directives to the .htaccess so those scripts can function.</p>
    <p>It is possible that you may need to edit the .htaccess file at some point, for various reasons.This section covers how to edit the file in cPanel, but not what may need to be changed.(You may need to consult other articles and resources for that information.)</p>
    <h4><u>There are Many Ways to Edit a .htaccess File</u></h4>

    • Edit the file on your computer and upload it to the server via FTP
    • Use an FTP program’s Edit Mode
    • Use SSH and a text editor
    • Use the File Manager in cPanel

    <p>The easiest way to edit a .htaccess file for most people is through the File Manager in cPanel.</p>
    <h4><u>How to Edit .htaccess files in cPanel’s File Manager</u></h4>
    <p>Before you do anything, it is suggested that you backup your website so that you can revert back to a previous version if something goes wrong.</p>
    <h4><u>Open the File Manager</u></h4>

    1. Log into cPanel.
    2. In the Files section, click on the File Manager icon.
    3. Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
    4. Make sure Show Hidden Files (dotfiles)” is checked.
    5. Click Go. The File Manager will open in a new tab or window.
    6. Look for the .htaccess file in the list of files. You may need to scroll to find it.

    <h4><u>To Edit the .htaccess File</u></h4>

    1. Right click on the .htaccess file and click Code Edit from the menu. Alternatively, you can click on the icon for the .htaccess file and then click on the Code Editor icon at the top of the page.
    2. A dialogue box may appear asking you about encoding. Just click Edit to continue. The editor will open in a new window.
    3. Edit the file as needed.
    4. Click Save Changes in the upper right hand corner when done. The changes will be saved.
    5. Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version until your site works again.
    6. Once complete, you can click Close to close the File Manager window.

    </div>
    </div>
    <div id=”edit_permissions”>
    <h3>How to modify file and directory permissions</h3>
    <div class=”content”>
    <p>The permissions on a file or directory tell the server how in what ways it should be able to interact with a file or directory.</p>
    <p>This section covers how to edit the file permissions in cPanel, but not what may need to be changed.(See the section on what you can do for more information.)</p>
    <h4><u>There are Many Ways to Edit a File Permissions</u></h4>

    • Use an FTP program
    • Use SSH and a text editor
    • Use the File Manager in cPanel

    <p>The easiest way to edit file permissions for most people is through the File Manager in cPanel.</p>
    <h4><u>How to Edit file permissions in cPanel’s File Manager</u></h4>
    <p>Before you do anything, it is suggested that you backup your website so that you can revert back to a previous version if something goes wrong.</p>
    <h4><u>Open the File Manager</u></h4>

    1. Log into cPanel.
    2. In the Files section, click on the File Manager icon.
    3. Check the box for Document Root for and select the domain name you wish to access from the drop-down menu.
    4. Make sure Show Hidden Files (dotfiles)” is checked.
    5. Click Go. The File Manager will open in a new tab or window.
    6. Look for the file or directory in the list of files. You may need to scroll to find it.

    <h4><u>To Edit the Permissions</u></h4>

    1. Right click on the file or directory and click Change Permissions from the menu.
    2. A dialogue box should appear allowing you to select the correct permissions or use the numerical value to set the correct permissions.
    3. Edit the file permissions as needed.
    4. Click Change Permissions in the lower left hand corner when done. The changes will be saved.
    5. Test your website to make sure your changes were successfully saved. If not, correct the error or revert back to the previous version until your site works again.
    6. Once complete, you can click Close to close the File Manager window.

    </div>
    </div>
    </div>
    </div>
    </div>
    <div style=”clear:left;”></div>
    </div>
    <div id=”bottom403″></div>
    </div>
    <script type=”text/rocketscript”>
    $(function () {
    $(‘.expander’).simpleexpand();
    prettyPrint();
    });
    </script>
    </body>
    </html>

    Time: 0.02s

    Hope someone can help me.

    https://wordpress.org/plugins/wp-piwik/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author braekling

    (@braekling)

    If you have a look at the second test results, you see a 403 FORBIDDEN.

    So you should check why your server does not accept the following http request: http://www.taxcreditexperts.co.uk/piwik/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url=http%3A%2F%2Frndtaxexpertsem.co.uk&format=XML&token_auth=

    Strange: The first call works, just the second one is rejected by your server. You should check your server log files and confer with your server admin why the “SitesManager.getSitesIdFromSiteUrl” request is rejected by your server. Maybe it’s caused by a rewrite rule or another htaccess entry?

    If you try to open the link above, you get the error in your browser window, too, so I think it is not related to WP-Piwik’s call.

    Thread Starter dan.abillon

    (@danabillon)

    Ok I’ll ask our server admin about this.
    Will update the thread later
    Thanks for the speedy reply by the way ^_^

    openjck

    (@openjck)

    Hi braekling,

    Thanks for your quick response to this. I wanted to report that I’m also seeing the Unknown site/blog error. Both WordPress and Piwik are hosted over HTTPS. I can access https://MY-PIWIK-DOMAIN/index.php?module=API&method=SitesManager.getSitesIdWithAtLeastViewAccess&format=Html&token_auth=MY-AUTH-TOKEN as expected, with no errors reported.

    Here are the versions of everything I’m using:

    • WordPress: 4.2
    • Piwik: 2.12.1
    • WP-Piwik: 0.9.9.18

    Hope it helps. 🙂

    Plugin Author braekling

    (@braekling)

    If you are also able to access the SitesManager.getSitesIdFromSiteUrl API call, your issue is different from dan.abillon’s: In his case his server blocks the request as “forbidden”. So please open a new thread about your specific issue and post your test script results. In most cases this gives a hint what’s going wrong.

    If SitesManager.getSitesIdFromSiteUrl gives you a “forbidden” error, you should also ask your server admin/ host or check your server log files. We have to figure out, why the server accepts the first call and denies the second one.

    Thank you!

    openjck

    (@openjck)

    Ah, my apologies. I thought Dan and I both ran into issue related to the recent WordPress update. If no one else reports my issue, I’ll chalk it up to a mistake on my end.

    Plugin Author braekling

    (@braekling)

    Just open your own thread and post your test script results. So I can see how I can help you… maybe the script helps to identify the problem. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unknown Site/Blog error’ is closed to new replies.