CformsII Persistent Serialized Data Error
-
I cloned a WordPress site to a local developer server and all was running well except for CformsII 14.6 plugin (older version than current fork) which is used for several forms. The plugin stated there was an issue with the serialized data. Using its built in fix option resulted to nothing or the no longer loading of any old data.
With the help of thread at SO [here][1] I managed to fix the serialized data, that is fix any string lenght issues. I used
$data = preg_replace('!s:(\d+):"(.*?)";!e', "'s:'.strlen('$2').':\"$2\";'", $data); //var_dump(unserialize($data)); echo $data;
With the code I was able to unserialize without any issues and print the fixed code. So I re-added the data to the options table row value cforms_settings.
But still the form data won’t load and I still get the error:Corrupted cforms settings array (raw code)
Depending on your WordPress/PHP skills you may want to try and fix the serialized data below, then hit the fix button or try just like that, cforms may magically fix it for you.Current data is [here][2] at Github. Quite a bit of code to paste here.
There must be either issues with the way the new local database deals with the imported data. But I have no idea how to debug.Any ideas how I can debug any further to resuscitate the forms?
NB Table Collation and Engine is the same on live and test server
[1]: https://stackoverflow.com/questions/4149030/php-unserialize-error-at-offset-works-on-some-servers-not-others
[2]: https://gist.github.com/jasperf/fabdc46cc93ef89ec1ac
- The topic ‘CformsII Persistent Serialized Data Error’ is closed to new replies.