Error: gzuncompress()


(jabberwack) #1

Hello,
I’ve installed piwik on my webspace, and its ok.
But if i log-in on the wigdets there is a error-message:
Warning: gzuncompress() [function.gzuncompress]: data error in /data/multiserv/users/162000/projects/678352/www/analytic/core/Archive/Single.php on line 270

Whats wrong?


(jstock) #2

I have checked out my copy of PIWIK the function you are having a problem with gzuncompress() is not piwik specific, it is a PHP function. it is possible that the version of PHP running on your web server does not support this function.

For more information please see this page
www.php.net/manual/en/function.gzuncompress.php

I would suggest that you ask your hosting company about this function.


(jabberwack) #3

Ok, thank you.
Do you know a free webspace that goes Piwik?


(vipsoft) #4

Can you patch your copy of core/Archive/Single.php, and report back?

Index: Single.php
===================================================================
--- Single.php    (revision 2891)
+++ Single.php    (working copy)
@@ -267,7 +267,13 @@
         // uncompress when selecting from the BLOB table
         if($typeValue == 'blob' && $db->hasBlobDataType())
         {
-            $value = gzuncompress($value);
+            $tmp = @gzuncompress($value);
+            if(empty($tmp))
+            {
+                var_dump($value);
+                die;
+            }
+            $value = $tmp;
         }
         
         if($typeValue == 'numeric'