PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, February 23, 2022

[FIXED] edit phpmyadmin blob field

 February 23, 2022     mysql, phpmyadmin     No comments   

Issue

Huh.

In the same vein as Viewing Content Of Blob In phpMyAdmin, i have a blob.

And just like in the screenshot of the given url, it says "blob". Thanks, phpmyadmin! You're the best!

Unlike the chap who asked the question above, though, I really want to edit the blob values, and then save them. So, if my blob has, as its text "ima blob yo" - and I can see that text, thanks to the solution given above - how do i edit that to "i am a blob, you".

I don't particularly want to upload a text file each time i edit a blob, that's totes bogue. Just want to edit it, as i would a text field.

cheers!


Solution

Ah. the phpmyadmin site, there this page: http://www.phpmyadmin.net/documentation/#faq1_31

$cfg['ProtectBinary'] boolean or string
Defines whether BLOB or BINARY columns are protected from editing when browsing a table's content. Valid values are:

    * FALSE to allow editing of all columns;
    * 'blob' to allow editing of all columns except BLOBS;
    * 'all' to disallow editing of all BINARY or BLOB columns.

Ok, so that details how to allow me to edit my blobs.

I made the change

$cfg['ProtectBinary'] = FALSE;
$cfg['ShowBlob'] = TRUE;

and put these two as the last lines in my config.inc.php file, which, because i'm using UBUNTU and used the auto install sudo apt-get install phpmyadmin, was at /etc/phpmyadmin/

And everything worked, kinda. I can now edit my blobs... with the limitation that phpmyadmin shows the current contents of the blob in "blob-view", which is a whole bunch of numbers or some nonsense.

Simple solution i found was to:

  1. write over the text. Simple editing isn't really an option, but luckily i didn't need to edit, just add in new data.
  2. change the "function" option from ... i cannot remember what it was, but it was something crazy... to just "blank". That's the same kind of blank as the function option defaults for other values - ints etc

cheers, andrew

PS that

$cfg['ShowBlob'] = TRUE;

was from the given url in the question i linked to. The poster states it isn't effective in phpmyadmin, but i only downloaded using a latest sudo-get a few months back, so it still works. Actually, i needed to put that value in to get editing to work.



Answered By - bharal
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing