首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
Fix Corrupted PHP Serialization Data
Type(Type) 2012/10/17 16:50

Fix Corrupted PHP Serialized Data

代碼:

PHP Notice:  unserialize(): Error at offset 8201 of 44790 bytes in /tmp/photos_dat_parse.php on line 4


It is so miserable if you found your old PHP modules serialized data corrupted and there is __NO__ backup file existed.
e.g. "Menalto Gallery" version-1/2 PHOTOS.DAT or ALBUMS.DAT corrupted, yet none sane backup serialized file remained.

The following tools may __SOMETIMES__ help to repair the broken serialized data, but remember NOT-always.

1. http://www.thecodify.com/php/repair-a-serialized-array/

2. http://shauninman.com/archive/2008/01/08/recovering_truncated_php_serialized_arrays

3. http://stackoverflow.com/questions/3148712/regex-code-to-fix-corrupt-serialized-php-data

4. http://stackoverflow.com/questions/8113542/making-a-script-that-can-recover-a-corrupt-serialized-string-in-php




No matter you can fix it or not,
TRY __not__ to store data in serialized format
as possible as you can, especially when the data will be with R+W transactions because it is usually hard to fix even manually by human-parser.




_
(2,153 views)
[更多討論] 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體

"Fix Corrupted PHP Serialization Data" 傳統頁面(電腦版)

首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
傳統桌面版 [ 登入/註冊 ]
© Vovo2000.com Mobile Version 小哈手機版 2024