Skip to main content

How to find serialized values in your MySQL database

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

As outlined in the last blog post, we needed to convert serialized data into JSON format to make Magento happy. Since Magento’s Magento\Framework\DB\AggregatedFieldDataConverter implementation needs to know which database fields to convert, we had to find them. The easiest way seems to be to go through the whole database and figure out which fields contain serialized data. Doing this by hand is no fun, so I wrote a little script that helped me with that task:

Magento 2.2 serialization issues

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

After upgrading a Magento 2.1 instance to Magento 2.4, I realized some problems with serialized data. In Magento 2.1 PHPs serialize() and unserialize() functions have been used whilst in Magento 2.2 the default serialization uses json_encode() and json_decode().

My Bash Prompt setup

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

About one year ago, I migrated from Linux to Windows and WSL 2. During this migration, I took the opportunity to rework my Linux setup in general. I was never a fan of fancy Bash prompts and “just” had Git in Bash prompt installed. During my migration, I had a look at what other options are around and came across a Powerline-like prompt for Bash written in Go. It looked easy to customize and extend, I gave it a try and liked it.

Counting characters in MySQL

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

For some data integrity checks, I needed to know if all SKUs stored in a MySQL database table have been properly imported. That implied making sure each SKU contained a string with 2 underscores as a separator. Knowing that PHP has functions like substr_count() or count_chars(), I was surprised that nothing similar exists in MySQL.

Magento Password Migration Problem

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

Recently, we took over a Magento 2 project where data was migrated from an older Magento 1 instance. The merchant complained that after the migration some customers are not able to log in anymore. Even a password reset did not work.

PHPStorm, Magento & WSL2 Performance

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· 2 min read
Stephan Hochdörfer
Head of IT Business Operations

Whilst I migrated from Linux to Windows and WSL 2 more than a year ago, I had a plan to install any development-related tools like Git or PHPStorm in WSL2. PHPStorm worked quite ok in WSL 2 except that filesystem changes (e.g. adding or removing files) made directly in WSL 2 were not properly recognized by PHPStorm. Even triggering a manual refresh from the disk did not always work. That made me install PHPStorm on Windows and open PHP projects via the WSL 2 integration of PHPStorm. That works better but still has its issues with larger projects.