|Sarah 8 November 2015
|Porting my blog for the second time, layout part 5
Porting my blog for the second time, render posts part 11
This is post #33 of my series about how I port this blog from Blogengine.NET 2.5 ASPX on a Windows Server 2003 to a Linux Ubuntu server, Apache2, MySQL and PHP. A so called LAMP. The introduction to this project can be found in this blog post https://www.malmgren.nl/post/Porting-my-blog-for-the-second-time-Project-can-start.aspx.
Currently I am in the midst of resolving little mysteries of specific blog posts that "goes wrong" in the new blog engine. Here is my next patient. It is from early this year. I managed to kill my server. Eventually it was the reason I started on this entire project of porting my blog. So this blog post breaks the layout.
The left sidebar is gone and the background is not behind the post. Why is this? And how will I solve it?
First I made a routine in the page rendering counting divs and it would skip divs when there was too many of them. Only one problem, it did not work at all. I looked around and found this at the end of the page:
The part with clear both is part of the surrounding page. That is the div that will make sure that the background is around the content. There is just one problem, the clear both div is in the middle of a style declaration of a span. So there happened something there, what could that be?
So when I compared with the old blog it became clear that in the new blog system just cuts in the midst of a tag. Midst is not true. The post is a really long post and there are just a few lines missing. So it stored 78197 characters? Oh wait... There are some processing first. URLs are resolved etc. That makes it much shorter. So I make my import routine tell me how many characters it loaded from XML: 70310. After processing of URLs etc the length stored in the database was 66058 characters. So where am I trying to store it?
In a field called Content of type BLOB which stands for Binary Large Object. Large? How large? 65535 characters. So I am missing 523 characters? That can be about right.
So then I found out there is a better type called LONGBLOB. It takes considerably more. So I used that.
I read my own text and laugh at myself a little. "So here we are. My blog is back!". Funny Jens.
Next time I will work on Emila Costas lips. She got fantastic lips. But how can I make them fit in my blog? But that is for the next time.
I was born 1967 in Stockholm, Sweden. I grew up in the small village Vågdalen in north Sweden. 1989 I moved to Umeå to study Computer Science at University of Umeå. 1995 I moved to the Netherlands where I live in Almere not far from Amsterdam.
Here on this site I let you see my creations.
I create, that is my hobby.