Posts Tagged ‘geek talk’

Unix Millenium Bug: Y2K38

August 25th, 2010

Picture courtesy to this blog.

I’m going technical today.

Remember the Y2K bug? The one where the date of 1st January 2000 appears to be translated by the computer as 1-1-1900? It happened because of the memory limitation where computer programmers previously only specify the range of date to be up until year 1999. They don’t expect their system to be available until year 2000.

Or so they thought.

Now, this problem might repeat itself on the year 2038. While not jumping into the calculation (you can read more of it on Wikipedia), basically it happened due to the memory limitation of 32-bit. The 32-bit memory calculated the time up until 19th January 2038, then it will reset the value to be a negative number. Picture below explains how it goes (courtesy of Wikipedia – click the picture to see the picture animation):

Solution? Upgrade your system to use 64-bit so that this kind of data can be calculated correctly. That’s the way to do it. This will effect quite a whole lot of applications that is date-sensitive; INCLUDING blogs, forums, and Web 2.0.

If you’re running your own self-hosted WordPress or any websites that capitalize PHP technology, try to run this piece of codes to see if your system is affected. Although most of web hosting is now using 64-bit Linux, well — you’ll never know. I am not sure if this will affect the Windows 32-bit system as well or not (maybe not, since the bug itself is called Unix Millenium Bug).

<?php
$date = ’2040-02-01′;
$format = ‘l d F Y H:i’;
$mydate1 = strtotime($date);
echo ‘<p>’, date($format, $mydate1), ‘</p>’;
?>

Code is courtesy of Tech Times newsletter from Sitepoint.com. Cool stuff. I’ve been reading their newsletters and webpages for so long now, and I’ve learned so much about web programming and other stuffs as well when visiting their sites.

So, are you affected? I’m not, luckily winking

Changelog: rearrange-inc.com

August 23rd, 2010

I’ve done some changes to this blog to accommodate more functionality and to clean up the databases and files. Security has been tighten, performance-wise has also been improved due to the migration of the server. Changelog as below for my own reference:

1- Hosting is now using ServerFreak

As stated in the previous EMO post, my previous hosting gives me problems a lot from the uptime, accessibility, and server stability. So no more cheap hosting without the proper functionality!

The matter was made worst when they revert my files prior to posting the Inception post below. Suddenly the post was reverted and lost in just 5 minutes of posting, just because I ping it to Twitter and Facebook? WTF!

So that’s about it. I moved to ServerFreak now. Better client support, better performance, better functionality, a bit expensive from previous hosting but very worth it. And it’s not that expensive either way, only RM140 per year for both domain name and hosting.

2 – Use 1-click Retweet/Share/Like plugin, remove the Random Quote plugin, more Nuffnang.

See the sidebar? No more random quotes like before. I decided to remove that plugins because I lost the tables of it. Damn! Even though I can rebuilt and search for new quotes, I just don’t feel like it for now. So… sorry!

But I added the 1-click retweet/share/like plugin. See the bottom of the post? If you want to like or share the post now, it’s easy! Yeay! (and the plugin produces a good looking buttons too. Nice! big grin)

And I decided to use the poll plugins from Nuffnang. See the new polls in the sidebar now? The orange one? PLEASE feel free to click it. At least I know better what are the things you guys like and wanted me to post moar tongue

Added the top header ads, sidebar ads, and square ads. The square ads only visible if you see the comments, so I don’t think its too much intrusive. Just worried about the header ads though; please give me feedback of how it looks likes once it appear.

(Oh. Feel free to click the ads too. HEHEHEHE tongue)

Pending Task:

1) Add more banner ads on the sidebar. Need to tweak the theme since it only gives four pre-defined template and left a lot of space below. Sigh.Not only that, need to select proper affiliate ads or banner that is useful. Don’t want to put those cialis/viagra type of ads. Acai berry pun cannot!!! tongue

2) Target of adding another one follower in NetworkedBlog. Now I got 19 follower, if can add another 1, additional functionality and statistics will be available from NetworkedBlog. Dying to see how good (or bad) it is.

3) Auto-publish to other social networks. Need to register for additional API and configuration stuffs. Still thinking whether to do it or not since my article and posts are not… that good to be shared. HAHA tongue

4) Figure out if I can monetize the blog in more ways without having to annoy my current readers. Most prolly won’t be able to figure out though. HAHAHAHAH tongue

ZOMG I was Hacked!

January 13th, 2010

No. This is serious business. I am not kidding. I was hacked! laughing

Okay, the better term is defaced. Not hack. Alright, not even defaced too much anyway. What he did (assuming that Rapcik0 is a man; not sure if this Turkish guy is a woman – I doubt that but hey, Trinity was being thought as a man. Okay stop thinking!) was changed my title post to HTML code that redirect to his site.

And the way he got to edit my title post is caused by the reset password vulnerability. Looks like he injected some SQL into the password reset function, and it give access to him. Then he changed the password of my WordPress account.

Damn.

I thought this hole was fixed prior to WordPress 2.8.6!

Okay fine. I went to cPanel, checked if he got that access, and apparently not. Reset all my password, and then changed the database. Got my access back, so I upgrade again to the latest WordPress. Then I undo his change. At first I thought he put the redirection on the index.php, but apparently not. That’s when I realized it was at the post title.

Done!

P/s: Lesson learn – a good precaution is always use strong password, upgrade the security and apply the fixes, yada yada yada. Thank you for this reminder, Rapcik0.