mod_security: URL validation produces 406 status error

sjaakter - May 13, 2008 - 12:05
Project:Piwik - Web analytics
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

When I fill out the settings for PIWIK Drupal module I get this message : A valid Piwik url is required. The provided URL was not accessible.
The URL I use http://www.sterwindt.nl/piwik If i use it in directly in the browser it works fine. Am I missing something.

Best regards,

Sjaak Terwindt.

#1

hass - May 14, 2008 - 15:17

Have you installed piwik from piwik.org under http://www.sterwindt.nl/piwik? The http://www.sterwindt.nl/piwik/piwik.php and piwik.js must be accessible in this folder... looks like the descriptions is not clear. i'm getting a file not found (404) on the link you provided.

#2

sjaakter - May 14, 2008 - 21:27

I've uninstalled piwik. I'll install it again tomorrow and try it again. Perhaps you can help me out then. Thanks.

#3

hass - May 14, 2008 - 21:38
Status:active» postponed (maintainer needs more info)

Keep in mind - you need two parts:

1. A working Piwik Installation (http://piwik.org/last.zip)
2. The Piwik module (http://drupal.org/project/piwik) to integrate #1 in your Drupal site.

#4

sjaakter - May 15, 2008 - 07:21

Hi,
I've re-installed piwik at http://www.sterwindt.nl/piwik and also installed the module in Drupal. Again I can access piwik with url http://www.sterwindt.nl/piwik but the settings in the module keep saying "A valid Piwik url is required. The provided URL was not accessible.".

Thanks for your help.

#5

hass - May 15, 2008 - 09:31

Ok, there seems to be an issue. Please keep the piwik up and i will try to fix this bug in ~10 hours. Thank you for you patience.

#6

hass - May 15, 2008 - 18:16

Do you have any explanation, why your web server gives a 406 status code on this request? With IE and Firefox it works and give me a correct status "200".

object(stdClass)#25 (5) {
  ["request"]=>
  string(118) "GET /piwik/piwik.php HTTP/1.0
Host: www.sterwindt.nl
User-Agent:
Drupal (+http://drupal.org/)
Content-Length: 0

"
  ["data"]=>
  string(335) "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An appropriate representation of the requested resource /piwik/piwik.php could not be found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.41 Server at www.sterwindt.nl Port 80</ADDRESS>
</BODY></HTML>
"
  ["headers"]=>
  array(4) {
    ["Date"]=>
    string(29) "Thu, 15 May 2008 18:04:39 GMT"
    ["Server"]=>
    string(10) "WebServerX"
    ["Connection"]=>
    string(5) "close"
    ["Content-Type"]=>
    string(29) "text/html; charset=iso-8859-1"
  }
  ["error"]=>
  string(14) "Not Acceptable"
  ["code"]=>
  string(3) "406"
}

#7

hass - May 16, 2008 - 07:16

Please use the next dev version only... it have fixed a critical bug for a roles visibility bug and this one also adds some more helpful error messages that could help you with your server issue. I have successfully tested the module with piwik.org/demo and locally.

#8

sjaakter - May 16, 2008 - 06:56

With the new version I get a message : The validation of "http://www.sterwindt.nl/piwik/piwik.php" failed with error "Not Acceptable" (HTTP code 406). I'll contact the provider and see if they can inform me about the 406. Why the server returns this value. It will take a while for I'm away for business for over a week. Thanks for your help.

#9

hass - May 16, 2008 - 07:16

Yep, that error message is what I've changed.

#10

sjaakter - May 16, 2008 - 13:08

I've done some searching on Drupal.org and found http://drupal.org/node/154919. I followed the link in the first reply and found the solution in adding

SecFilterEngine Off
SecFilterScanPOST Off

to the .htaccess file. Now I can make the settings and I can see the piwip stuff added at every page I look at (looking at the page source). I think this solves the problem. I've seen some activity know. Great.

Thanks a lot for your help.

Best regards,

Sjaak Terwindt

#11

hass - May 16, 2008 - 13:34
Status:postponed (maintainer needs more info)» fixed

Interesting... Aside this validation is only a GET. So if you'd like to keep your server as it was you could try the first setting only or

SecFilterEngine On
SecFilterSelective "REQUEST_URI" "/piwik/piwik.php" "allow,nolog"

#12

hass - May 16, 2008 - 13:36
Title:URL not accessible.» mod_security: URL validation produces 406 status error

#13

Anonymous (not verified) - May 30, 2008 - 13:41
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.