Rewrote script in PHP to fix various errors from redis. Also faster
I was having some problems running this script - I would get various errors back from redis that seemed to suggest that the line length specified for the data line was incorrect. This mostly/entirely happened with sessions created by phpMyAdmin - i.e. very long files, with lots of complex PHP serialization strings.
I tried to fix the bash script for a while, but there were parts where I wasn't confident about what was going on, so I rewrote the whole thing in PHP (which I figured was fine in this case, since it's a PHP-related script, so anyone wanting to run it would probably already have PHP installed). My PHP version not only migrates my ~600 sessions flawlessly, without getting stuck on the phpMyAdmin sessions, but it also runs a lot faster (I'm seeing it execute in under 1 second for ~600 sessions, while the original script took around 4-5 seconds to run).
hey man, its all GREAT that you fixed it, however I stop working with PHP and this script it not in use (by me anymore), feel free to fork it and apply your changes to it !!
That's cool, no worries :) I figure that having this pull request here may help people find my version if they have the same problems that I did. No need to merge it or anything :)
Yep you are right? coolio, nice work !!