gevensen Posted April 1, 2009 Share Posted April 1, 2009 i am trying to run a report on a sunshop shopping cart table the data is base 64 endoded and serialized i get the following result after doing a base64decode and unserialize __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => item [id] => 20 [quantity] => 1 [options] => Array ( ) [regid] => ) i am mainly looking for item id and quantitiy which is in there my question is this how do i remove the __PHP_Incomplete_Class Object error when i dont know the original class name the code blow simply dumps the data on the screen and row[4] is the problem string while($row=mysql_fetch_array($result)) { $return[] = $row; echo(" OrderID - "); print_r($row[1]); echo(" ProductID - "); print_r($row[2]); echo(" Price - "); print_r($row[3]); echo(" Data Array - "); $product_array = unserialize(base64_decode($row[4])); echo nl2br("\n"); echo(" Trying to Unserialize "); echo nl2br("\n"); print_r($product_array); } Link to comment https://forums.phpfreaks.com/topic/152058-how-can-i-remove-__php_incomplete_class-object-error/ Share on other sites More sharing options...
dalvisadashiv Posted August 31, 2012 Share Posted August 31, 2012 check that you are store the object by serializing i.e. $obj = new myclass(); $_SESSION['obj'] = serialize($obj); and while retrieving use $obj = unserialize($_SESSION['obj']); HTH, Sadashiv. Link to comment https://forums.phpfreaks.com/topic/152058-how-can-i-remove-__php_incomplete_class-object-error/#findComment-1374365 Share on other sites More sharing options...
PFMaBiSmAd Posted August 31, 2012 Share Posted August 31, 2012 a) The question has nothing to do with sessions and the data is obviously being serialized when it is stored, since it is being unserialized to get to the point of displaying the data/property values, b) The thread is 3 years old and the OP has been active since then, so it's unlikely he is still looking for an answer to this, c) The solution would be to either ignore the error or include likely class definitions until the error is eliminated, d) Locking thread so that no one else spends time replying in it. Link to comment https://forums.phpfreaks.com/topic/152058-how-can-i-remove-__php_incomplete_class-object-error/#findComment-1374366 Share on other sites More sharing options...
Recommended Posts