Content with Style

Web Technique

Viewing BLOB content in phpMyAdmin

by Matthias Willerich on November 20 2009, 08:25

In my phpMyAdmin installation, version 3.1.1, none of the old style config settings such as

$cfgShowBlob = true

or

$cfg['ShowBlob']

had any effect, and the solution was terribly elusive. "view blob", "show blob", "display blob", all that Google suggested were people asking the same question, at various ages of the internet.

Even more annoying, the most common answer was "Why would you want to do that?", and too many times I was reading that they shouldn't be read anyway, because it could be large amounts of, well, binary data, bla bla bla.

In my case this makes very much sense, though, because I was looking at serialized data objects. Don't ask me why it's not a TEXT field (another smartypants suggestion in a forum), that's just the setup I was dealing with.

After much digging and the wish for a search engine that will suggest better search terms to me, I finally decided to bother the source instead, and found "display_blob". Hurray! It comes in this form:

$_SESSION['userconf']['display_blob'];

All you need to do is set this session variable (possibly by sticking it into the config? I didn't try it out), or alternatively: Open the content frame and put

&display_blob=true

into the querystring, and it will keep it in the session for you, when you use the frameset as normal afterwards.

While writing this, I also saw this page, can anyone translate?

Comments

  • This worked for me on ubuntu 9.10 lamp\'s /etc/phpmyadmin/config.inc.php:

    $cfg[\'ProtectBinary\'] = FALSE;

    (remember /etc/init.d/apache2 restart)

    by Francis on January 26 2010, 00:55 #

  • Got tripped up by the ShowBlob deprecation my self. I guess the documentation is my friend, but I keep forgetting about it: http://wiki.phpmyadmin.net/pma/Config

    Seems like the only way to display blob data is with $cfg[\'ProtectBinary\']

    by cybertoast on February 4 2010, 16:08 #