edit phpmyadmin blob field

后端 未结 3 1029
日久生厌
日久生厌 2021-01-18 16:40

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, p

相关标签:
3条回答
  • 2021-01-18 17:12

    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.

    0 讨论(0)
  • 2021-01-18 17:30

    If your BLOB field is really only text, then you might consider converting your BLOB field to a TEXT field (there should be no loss of data in the process). TEXT fields are viewable/editable directly from phpMyAdmin.

    0 讨论(0)
  • 2021-01-18 17:31

    I'm using phpMyAdmin v4.6.4. I find an option on GUI to set this config.

    You can click on Home button. Then click on Panel Appearance settings. In this screen, click on Main panel tab, then Edit mode tab. After that, select 'no' in Protect binary columns dropdown.

    Edit mode tab

    0 讨论(0)
提交回复
热议问题