blogestudio / fix-serialization Goto Github PK
View Code? Open in Web Editor NEWScript to fix length attributes in serialized strings
License: GNU General Public License v3.0
Script to fix length attributes in serialized strings
License: GNU General Public License v3.0
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 Regards, Pau Iglesias Blogestudio http://blogestudio.com/
The following error is thrown when using PHP > 7
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in fix-serialization.php on line 74
The argument to the file is the sql file you wish to fix, but the path must be relative to the location of the script.
Instead, allow it to be relative or absolute (start without ot with a /, respectively).
This would allow one to put the script in /usr/bin/ for example, then use it at the command line and pass absolute paths.
Also, if a relative path is passed, make it relative to the command line's pwd, not relative to the script.
Other than that, it worked perfect! THanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.