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 855 forks source link

DUP_Package required before unserialize() is called #241

Closed damiencarbery closed 4 years ago

damiencarbery commented 6 years ago

Using CLI version because browser version hangs. Version 3.1.0. PHP 7.2.6.

Warning message displayed many many times: PHP Notice: icit_srdb::recursive_unserialize_replace(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "DUP_Package" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition in srdb.class.php on line 755

Should I be concerned?

HongPong commented 6 years ago

definitely an issue on PHP 7.2.10-0ubuntu0.18.04.1 . same deal, browser version hangs. dang!

chrisbarnett1 commented 6 years ago

I get the same with PHP 7.2.11-1.ius.centos7

This will likely be the case for all versions of PHP 7.2 I think.

It seems as of PHP 7.2 the function is_object() now returns TRUE for unserialized objects without a class definition (i.e. class of __PHP_Incomplete_Class). It previously returned FALSE.

I'll submit a patch for this

chrisbarnett1 commented 6 years ago

https://github.com/interconnectit/Search-Replace-DB/pull/251

Firsh commented 5 years ago

Hey, this class is actually from a WordPress plugin https://wordpress.org/plugins/duplicator/ which creates its own table and hold some data in a binary blob thingy (never seen that in SQL). Makes sense that this surfaced here because that plugin does a similar task as this tool. I prefer this tool, was just migrating a site that wasn't mine and run into this. Actually, even if I spent some hours on this, at least I learned the CLI (it was giving me the real errors, unlike any logs on the server). I pieced together some modifications from pull requests here and now CLI runs fine, GUI runs better but still has problem with that WP plugin's table.

gianluigi-icit commented 4 years ago

we are preparing a new version, thanks for the report

robots4life commented 4 years ago

With the latest version I get the unserialize error. With the fix https://github.com/ouija/Search-Replace-DB/commit/175533ea5d6baa299bc551a009cdc73a96264b31 that error is gone. Will this be merged?

jack-interconnectit commented 4 years ago

@robots4life yes it's being merged