Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help solving Notice: unserialize() [function.unserialize]: Error at offset with OpenCart Additional tabs

Posted on 2011-09-29
3
Medium Priority
?
2,640 Views
Last Modified: 2012-05-12
Im currently developing a site, that has a module that seems to work until too much information is put into the database field.

The developer is storing data in this field with separators that are exploded into an array and iterated on the web page.

Though, when adding a lot of data, I get this error Notice: unserialize() [function.unserialize]: Error at offset 29755 of 65449 bytes in ......

Ive tried changing the type of database field from utf8_bin to utf8_general_ci and that didn't work. I also checked to make sure something like that & signs were set to & in the html data it had, but still no luck. I do have a URL for preview if needed.

0
Comment
Question by:webrhp
  • 2
3 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 36890803
The developer is storing data in this field with separators that are exploded into an array and iterated on the web page.

If I understand that statement correctly, it sounds like the data base design is not technically competent.  It is true that you can store more than one field in a column of a data base, but it is not normal, and it is sometimes unwise to do that.  A better design might be to have a separate table for these data items, and join the tables when the query is executed.  

Unserialize() and Explode() are different PHP functions, and while they do some things similarly, it appears that the Notice is having difficulty with the former function.

To give you anything specific we would need to be able to see the data string that is causing the Notice.  Probably we would want to see the code that shows how it was created, too, along with the input data to that code segment.
0
 

Author Closing Comment

by:webrhp
ID: 37056566
Thank you for your reply, and it seems you are correct. In fact, it seems my error was because there was too much data in the field. Once I stripped the HTML's white space, and minimized the number of lines, the error disappeared.
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 37058013
Thanks for the points - glad it's working well, ~Ray
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This article was initially published on Monitis Blog, you can read it here . When it comes to deciding which approach to website performance monitoring is best for your business, unfortunately, like so many options in life . . . it depends. In th…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question