Odd and evil things

Today I learned it's possible to add an extra submit handler when using hook_form_alter() in Drupal. En concreto, I can for example create new nodes when someone adds a new language in the locale module. If I were very evil, I could write a contributed module which would be very interesting for the community, but if someone doesn't take a look at my code, he wouldn't see I've added an extra submit function that deletes all nodes after he changes his files settings. Luckily I'm a decent person, I'll never do that :) I'm just very happy I found a solution without messing on the core files!

Evil also seems to be the combination of PHP5, apache and APC: the thing simply crashes every minute, especially when heavy calculations take place leaving nothing but segfault lines in your error log and dumping core in your directory. I've been running a server with lighttpd and XCache (xcache.lighttpd.net) now for a week and I haven't had any phone calls from people seeing the white screen of death, let's hope things stay that way, otherwise, well, I dunno what else for now ...

I also learned something - rather stupid - today: if you enter 0.0 (or 00.00, 0000.000000, etc) in your address bar, the browser takes you to your localhost. I'm not sure what happens if you don't run a local webserver, because I simply don't have any computer without it - and I'm to lazy right now to stop my lighty service.

Anyway, it has been a very interesting and stressy month and I can finally chill out a bit, maybe (finally) get to record some songs again, whatever and of course counting the days untill the first of march when I leave for the upcoming DrupalCon in Boston and a few days wandering around in New York, yay!


drupal, lighttpd, apc, xcache

No papers

I managed to drive for more than 3 months without my car papers, I can't really guess what would have happened if the cops would have stopped me. So next time when my parents advise to hide them somewhere in my house when I'm on vacation, I'll gladly ignore this. And to think I've been to France twice - I'm a lucky boy sometimes. Anyway, that's the most exciting thing that happened to me in 2008 so far, I'm hoping to get to some new song-recording this weekend and not touch a keyboard at all!



The init hook enigma, part 2

I struggled a few days with some functionality on the new CarChannel site where visitors are offered a splash page the first time they visit the site. I needed to built in some exceptions, like the special msn page, the xml calls and the game pages. Testing when you are logged in always worked, but when browsing anonymous and with normal caching on, things went wrong, especially with url aliases. Reading source code and documentation - or now when you are reading this article - can save your life, so when you have an init hook and you need the know the 'q' variable, add


at the top of your hook before doing anything else. This will save you many sleepless hours and frustrating tests!

Being the only *nix sysadmin (or at least, the only guy at work who knows a little more then just opening an ssh-session) also made me very stressed out the last couple of weeks because services suddenly died without leaving any information in logs. I spent the whole afternoon yesterday setting up extra monitoring services on 2 higly imported webservers which check apache, mysql, ssh and load average every five minutes and , if needed, takes the appropriate action (restart, renice etc). It was the first night in a week I finally slept the whole night through, so fingers crossed!


drupal, work, linux, hooks

Drag and drop

To all my mac-colleagues at work: I can finally stop bugging you over msn asking me to put your drag-and-dropped attachments in your e-mail into my transit. Since I switched from evolution to thunderbird, I can actually see, read and save them ... a life-saver for everybody! With this said, back to coding - which is the only thing I seem todo nowadays.


work, email

My predictions for 2008

Back from France and into a new year, time for some bold predictions for 2008:

  • I'll make some cool trips, one being to the USA. check!
  • The second (maybe the third, we'll see) of my triplet tattoo project on my arm will be finished. check!
  • I will at least attend one geek conference and maybe speak at one - probably about Drupal. check!
  • Time for daring stuff: a parachute or a bunguee jump or anything that makes my heart go much faster
  • I'll start jamming again, but now with the Canisters and buy that beer I promised to some people Partially check!
  • I'll meet one famous person - preferably Scarlett Johansson - and share a beer with him/her
  • My living room will be reorganised with a big mediashelve where I store all my books and cd's
  • I will create the coolest door to my bureau ever, a bit like this.
  • Rethink my complete pc/media/audio/jukebox setup in my house
  • I will be able to do the Michael Jackson's moonwalk by the end of year. check!




Subscribe to realize.be RSS