Using a Bundle in Sequel Pro to Deserialize PHP Data

Sequel Pro iconThis is for the Mac + Sequel Pro + PHP users out there. If your PHP app (such as Drupal) stores data in the database as PHP serialized strings, you can use a Bundle with Sequel Pro to deserialize and display it in Krumo. This allows you to avoid copy and pasting the string to a 3rd party deserializing site.

Sequel Pro can be extended by installing bundles. You can read more about bundles here. We want to install the “Deserialize php with krumo” bundle that has been contributed from the community. It’s located in Sequel Pro’s Bundles GitHub repo under the contributed folder.

To install the bundle:

  1. Download “Deserialize php with krumo.spBundle” (or clone the whole repo if you like).
  2. Double-click the “Deserialize php with krumo.spBundle” file.

That was easy enough.

node_types_cacheSo lets see it in action. As an example, I’ll choose the serialized node types data cache from a standard install of Drupal 7.

node_types_dataDouble-click on the data column for the node_types row.

node_type_data_sheetThat brings up the serialized data in a sheet.

deserialize_menuNext, right-click on the data to bring up the contextual menu and select Bundles > Format > Deserialize PHP with Krumo.

data_deserialized_krumoThat opens a window and displays the deserialized data with Krumo.

That’s all!

Leave a Reply

Your email address will not be published. Required fields are marked *