forked from Blogestudio/Fix-Serialization
-
Notifications
You must be signed in to change notification settings - Fork 2
Script to fix length attributes in serialized strings
License
rysi3k/Fix-Serialization
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fix Serialization A PHP script to fix length attributes for serialized strings over database dumps (e.g. Wordpress databases) This script can be useful if you perform text replacements in database dumps containing serialized data structures, so that reconstructs the serialized length attribute and prevents the serialized offset error in code execution. How to use: - Execute directly this script in the way: /usr/bin/php fix-serialization.php my-sql-file.sql - Or use the shell script replace.sh that replaces with sed command each sql file in directory and call fix-serialization script sh replace.sh Licensed under the GPL version 3 or later: http://www.gnu.org/licenses/gpl.txt =========== Fixes by rysi3k: - preg_replace modifier "e" is deprecated since PHP 5.5, so replaced with preg_replace_callback - removed dirname(__FILE__) in file path allows to use relative paths for script and sql file
About
Script to fix length attributes in serialized strings
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- PHP 92.9%
- Shell 7.1%