Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 879227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:53:53+00:00 2026-05-15T11:53:53+00:00

I have a massive multidimensional array that has been serialised by PHP. It has

  • 0

I have a massive multidimensional array that has been serialised by PHP. It has been stored in MySQL and the data field wasn’t large enough… the end has been cut off… I need to extract the data… unserialize wont work… does anyone know of a code that can close all the arrays… recalculate string lengths… it’s too much data to do by hand.

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:53:54+00:00Added an answer on May 15, 2026 at 11:53 am

    I think this is almost impossible.
    Before you can repair your array you need to know how it is damaged.
    How many childs missing? What was the content?

    Sorry imho you can’t do it.

    Proof:

    <?php
    
    $serialized = serialize(
        [
            'one'   => 1,
            'two'   => 'nice',
            'three' => 'will be damaged'
        ]
    );
    
    var_dump($serialized); // a:3:{s:3:"one";i:1;s:3:"two";s:4:"nice";s:5:"three";s:15:"will be damaged";}
    
    var_dump(unserialize('a:3:{s:3:"one";i:1;s:3:"two";s:4:"nice";s:5:"tee";s:15:"will be damaged";}')); // please note 'tee'
    
    var_dump(unserialize('a:3:{s:3:"one";i:1;s:3:"two";s:4:"nice";s:5:"three";s:')); // serialized string is truncated
    

    Link: https://ideone.com/uvISQu

    Even if you can recalculate length of your keys/values, you cannot trust the data retrieved from this source, because you cannot recalculate the value of these. Eg. if the serialized data is an object, your properties won’t be accessible anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have DB that has massive amount of business logic stored in triggers inside
I have a massive amount of data that needs to be read from mysql,
This has been killing me - I have a massive file that I need
I have a massive viewstate hidden field that is causing my application to be
I have a large Java app that uses massive amounts of memory at times
I am importing massive amounts of data from Excel that have various table layouts.
I have a massive amount of input data (that's why I use Hadoop) and
I have a massive table with thousands of rows. Each row has a unique
I have a massive set of files (4000+) that are in an old Apple
Im using wordpress for my website and i have a massive amount of data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.