0

Is there a simple way to look at BLOB data that Drupal 7 stores in some tables?

There is a trick to configure phpmyadmin but apparently it's not working with version 3.3.9.2 that comes with MAMP.

4
  • 2
    The free version of Navicat lets you view BLOB fields as text very easily...I've been using it for many years now and it plays nicely with MAMP
    – Clive
    May 25, 2012 at 22:14
  • that worked, thanks! Any way of rendering the json krumo style to be able to inspect it better?
    – uwe
    May 26, 2012 at 20:16
  • 1
    If only it was JSON there would be a couple of different ways to browse it, but unfortunately it's a serialised PHP object :/ You might get away with doing something like: dpm(unserialize('DUMP_BLOB_HERE')); in code but I haven't tried it out
    – Clive
    May 26, 2012 at 23:52
  • 1
    This solution worked for me, there are others mentioned there.
    – uwe
    Nov 9, 2012 at 18:57

2 Answers 2

2

If you need to peek, say into user-­­­>data, which is seralised data array, just use drush sqlc to bring yourself to an sql command line, then type:

 select uid, name data from users where uid = <whateveruidyouwant>;

This works for any data, and if you are brave you can even edit the serialized data via command-line but is not recommended unless you know what you are doing.

1

I would json_encode the array into a variable and spit it out via devel.

$var = json_encode($yourarray); 
dpm($var);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.