Piwik database - piwik_archive_blob value column

倖福魔咒の 提交于 2019-12-13 08:22:05

问题


I am using Piwik and after inspecting the database i see a table: piwik_archive_blob__

This table has a column called value with type: mediumblob

The values appear to be jumbled characters. I assume that there is an encode/decode process.

Can anyone help me decode this column. I think there is good data here, but i need to be able to read it

Thanks


回答1:


The value column stores serialized and gzcompressed DataTable objects, so there is no easy way to read it.




回答2:


Just a quick example how you could uncompress and deserialize it using PHP:

  1. Download the blob as a .bin using something a tool like phpmyadmin
  2. Load the file into PHP, uncompress and unserialze it using the following:

<?php $sBlobFile = file_get_contents( 'piwik_archive_blob_2017_03-value.bin' ); $sBlobFile = unserialize( gzuncompress ( $sBlobFile ) ); var_dump( $sBlobFile );

Of course you can also just retrieve the blob using MySQL and access it directly in PHP opposed to downloading it as a file first.



来源:https://stackoverflow.com/questions/27622759/piwik-database-piwik-archive-blob-value-column

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!