Add this blog to Del.icio.us, Digg or Furl | Create Watchlist for this blog

Archive for January, 2008

SUN to buy MySQL AB

Wednesday, January 23rd, 2008

As Mr. Schwartz, CEO of SUN Microsystems wrote here, SUN is going to acquire MySQL AB for about 1 Billion Dollars.

What does this mean to Oracle, Sybase, DB2 and MSSQL Server?

It’s out of the question, that MySQL is the most used Database worldwide. The main reasons are, that MySQL runs with poor hardware, it’s easy to install, to administrate and to use. And it’s for free. When I look back at my jobs in the trading area of investment banks, I remember lot’s of Solaris/Sybase installations. Now, I foresee problems for Sybase here. When I look back at my jobs in the backoffice area of retail banking, I remember lot’s of Solaris/Oracle and AIX/DB2 installations. Will SUN MySQL be as reliable as Oracle or DB2 is? Then I foresee problems here as well.

Why should one pay for Oracle or DB2 when MySQL comes from SUN and is for free?

I am sure MSSQL will keep it’s place in the low-range small office area - just because of the MS certified staff that’s working here. But I foresee huge problems (see here also) for the big systems Oracle, Sybase and DB2.

All the IT world is moving to open source !!!

And that’s a good way

Most challenging project

Thursday, January 10th, 2008

These days I have lot’s of fun and blitheness :-)

Feeding my child

Small site experiment

Thursday, January 10th, 2008

On my search about if search engines like small site or big sites I found no satisfying answer. So I set up a little experiment on my own. I drive a lawyer directory with like about 20.000 pages for two years now. For search terms like “Rechtsanwalt Berlin” - I am aiming for city specific searches - I rank very well on the first SERP.

Now I set up special pages for the most biggest cities in Germany, having urls like rechtsanwalt–berlin (double dash - cause single was already taken for sure) and put three pages there. So it’s a real small site with a very specific topic.

Today - with this entry - I make it public and give em some PR power. In four weeks we’ll see how they do.

Rechtsanwalt Berlin
This is Germanys most biggest city. My current anwalt-seiten ranking on Google is 10. Now I started the special site Rechtsanwalt Berlin - let’s see what happens in like two weeks.

Rechtsanwalt Hamburg
This is Germanys second biggest city close to the North Sea. My current ranking on Google is 9. I set up the special site Rechtsanwalt Hamburg lately - let’s see what happens.

Rechtsanwalt München
This is Germanys third biggest city and I always have troubles with the “ü”. You probably now it from the Oktoberfest!
My current ranking on Google is 18. I launched Rechtsanwalt München view days ago - be patient…

I’ll keep you informed here.

New MIMEMailPHP Version 2.1.3 released

Tuesday, January 8th, 2008

Users told me they had problems with some online mail clients (like gmx and gmail) viewing mails sent with my MIMEMailxPHP4_V2 PHP class when cid (base64 coded inline) images are contained.
There was a bug initially found by Patrick Kränzlin. This bug is fixed now, you find the current (2.1.3) Version for download (it’s open source) here.

According to the RFC2111:

Note: in Internet mail messages, the addr-spec in a Content-ID [MIME] or Message-ID [822] header are enclosed in angle brackets (<>). Since addr-spec in a Message-ID or Content-ID might contain characters not allowed within a URL; any such character (including “/”, which is reserved within the “mid” scheme) must be hex-encoded using the %hh escape mechanism in [URL].

I forgot the angle brackets in version 2.1.2

Sorry for that!

Drupal: Using node and user information in block code

Monday, January 7th, 2008

This is for Drupal 5, don’t know if it works also in version 6.

Usually block content is not related to the currently displayed node. I.e. the block that displays the recent blog posts always displays the same content, regardless of on what page you are currently looking.
I often had situations where I wanted the block content to be related to the currently viewed node. To keep the example: When viewing a blog post, I wanted a block to display the most recent post of the author of the currently displayed post, and additionally print some profile fields like age and a gravatar.

The key to achieve this goal is the Drupal arg() function. This function returns the components of the currently viewed path before any URL aliasing. So if you view the node 5, that is yourdomain.com/node/5 (and sometimes a trailing “view”), you will get following results from function arg():

arg(0) -> "node"
arg(1) -> "5"
arg(2) -> "" or "view"

Now, if you want to get some information about node 5, you use node_load(). And to get information about the user that is the author of node 5, you use user_load().

In PHP code it works out like:

if (arg(0) == 'node'
    && is_numeric(arg(1))
    && (arg(2) == '' || arg(2) == 'view')) {
 $node = node_load(arg(1));
 if (is_numeric($node->uid))
   $user = user_load(array('uid' => "$node->uid"));
 ... do something with $node and $user here
}

BTW: If you need this a lot, you should consider writing a module for your content type :-)

To make a useful example out of it…
I use the following “debug-block” while developing to view my node and user objects:

if (arg(0) == 'node' && is_numeric(arg(1))
    && (arg(2) == '' || arg(2) == 'view')) {
 $node = node_load(arg(1));
 if (is_numeric($node->uid))
   $user = user_load(array('uid' => "$node->uid"));
 print "node object<br>";
 foreach ($node as $k => $v) {
  print "[$k] = $v<br>";
 }
 print "<br>user object<br>";
 if ($user) foreach ($user as $k => $v) {
  print "[$k] = $v<br>";
 }
} else {
print 'not a node';
}