interconnectit / Search-Replace-DB

This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.
https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
GNU General Public License v3.0
4k stars 854 forks source link

Erroneous data format for unserializing #375

Open paulpestov opened 2 years ago

paulpestov commented 2 years ago

Hey, I'm using it on Wordpress + ACF plugin and when running the script for the first time everything is ok. But applying the script a second time causes the error below. The replacement still seems to be working and does not break ACF values (especially links) as far as I can see.

The use case would be local db -> stage db -> live db.

2: Erroneous data format for unserializing 'Requests_Utility_CaseInsensitiveDictionary' in /home/www/web271.s188.goserver.host/replace/srdb.class.php on line 835

This is usually caused by a plugin storing classes as a serialised string which other PHP classes can't then access. It is not possible to unserialise this data because the PHP can't access this class. P.S. It's most commonly a Yoast plugin that causes this error. Your changes will still have taken place within the rest of the database.
f1rf1n commented 1 year ago

Had the same problem. for me using the CLI version instead of the webbased form worked. I still got the error mesages, but all my string were replaced anyway

php Search-Replace-DB/srdb.cli.php -h [databasehostname] -n [DBname] -u [DBuser] -p "[DBpasswd]" -s "[searchstring]" -r "[replacestring]" --verbose