xampp, skype and port 80

For some time I’ve been considering setting up some php development environment. Not that I like php but I want to play with some php stuff nevertheless (e.g. Drupal seems interesting). So I downloaded one of the popular all in one packages that combine apache, mysql and php: xampp. I have actually set up apache, mysql and php manually once on windows and know that it is A) doable and B) very tedious, hence the integrated package this time.

Xampp sure makes it really easy. Download, install, run xampp configuration tool, start mysql … green, start apache … ???!??!!! WTF, it won’t start. So I go to localhost with the browser, blank page instead of the expected error. So I check my processes list, no sign of httpd. Now this is weird, some process is definitely listening on port 80. So, I run netstat to find out who is guilty of this crime. It turns out that skype is actually listening on port 80 for some stupid reason. That just sucks. Luckily there’s an option in the skype preferences to turn it off but still, don’t open port 80 if you are not a web server.

Anyway, problem fixed and 2 minutes later I’ve created a database using phpmyadmin and installed drupal 5.2 and configured it. That’s just what I wanted: 2 minutes of work and *poof* instant website.

In case you are wondering, yes I am considering to dump wordpress. The reason is the lack of clear progress in getting proper openid, atompub and microformats support in wordpress. You can all sort of bolt it onto a wordpress install but not without editing php and default templates (and this tends to break during upgrades, i.e. every 2-3 months). Drupal seems much more feature rich and configurable than wordpress and it sure is tempting. Concerns I have include import/export of data (including e.g. uploads); openid support; comment & referral spam blocking; etc.

Update.

After playing with drupal 5.2 and a development snapshot of 6.0, I’ve decided not to migrate because simply the migration is too hard currently. There is only a seriously outdated module for drupal 4.7 which can only migrate wordpress version 2.0. In other words, this is unlikely to work for my blog without a lot of tinkering. Additionally, moving from drupal to something else is likely not exactly trivial either. I migrated from pivot to wordpress early 2006. That was quite painless since wordpress has excellent import feature. Drupal lacks such features and wordpress has no Drupal import as far as I know (would be hard due to the generic node datastructure in drupal).

BTW. I’ve spent some time researching the topic. This link here is the most informative I was able to find: http://drupal.org/node/69706. Be sure to also check the comments.

I’ve taken a brief look at joomla too. Interesting product but not really designed for Blogs. Overall, I’m pretty happy with wordpress. It’s just that I want proper openid support.

simple note encrypt/decrypt with AES in javascript

Inspired by the hype surrounding the iphone and web applications, I hacked together a nice little toy to encrypt and decrypt text using aes. I borrowed the aes implementation from here and basically wrote a somewhat nicer UI for it. I still need to integrate sha1 hashing of passwords as the aes.js script author suggests that is a bit more secure than his current method.

I have no idea if it will work in the iphone browser since I’ve only tested in firefox. It partially works in IE7 and I have no desire to spend time finding out why it fucks up. Suggestions to improve my little javascript hacking are welcome of course.

BTW. password of the default content is: “secret”.

Facebook

It seems I’ve been unaware of the little revolution that has been unfolding since May 24th. Before that, facebook was yet another social network popular mostly in the US. On that date, facebook opened up their API and made it possible for people to integrate their 3rd party services into facebook. Marc Andreesen explained the concept in a lengthy post that is well worth reading around mid June. This too went unnoticed by me. To my defense, I was on vacation first half of June and maybe a bit less connected than I usually am.

About two weeks ago, my neighbour, friend & colleague Christian del Rosso, invited me to facebook. He must have noticed that I didn’t catch up his earlier link to Marc Andreesen’s article. So I dutifully signed up not expecting much of it but somewhat curious to find out why facebook was being mentioned a lot lately. I’m already on linkedin and del.icio.us so I thought I was pretty well covered in this web 2.0 thing. Apparently not.

In the past two weeks, I found several people I know that recently created accounts on facebook. Facebook has the notion of networks and groups and I’m in several of those now, all rapidly growing. Finally in the last few days I started exploring facebook a bit more in depth and doing things like updating my profile, exploring other people’s profiles, and finally figuring out that there’s a shitload of cool applications that integrate into facebook. The proverbial penny dropped only a few days ago.

I’m on iLike, mytravelmap and flixster now. Also I have hooked up my blog and del.icio.us to facebook and of course installed the chuck norris fact generator. All very fun toys. The first three I would probably never have signed up for seperately.

The only thing that I don’t like is that openid is not part of facebook. That’s a pitty, because I believe the fully decentralized mash ups enabled by openid are the future. Ultimately, facebook is another vertical and the waiting is just for who will buy these guys (and for how much). It seems that .com bubble 2.0 is now well underway.

It would seem from the above that facebook is perfect. Of course it isn’t. I’ve encountered many issues so far: performance problems; parts of the site not working; strange errors and failing ajax stuff. Also I noticed that the entire thing seems to be written in php. That could give rise to some worries related to e.g. security and scalability. Opening it up to basically anybody who cares to develop 3rd party stuff does not exactly make it better.

Running Tomcat on N800

I’ve been doing some N800 hacking at work recently and have been toying with getting various programming environments going. Including the one I know best: serverside Java.

To get Java on the N800, you will need jamvm. Some packages for that are provided here: http://www.internettablettalk.com/forums/showthread.php?t=2896. The packages are unsupported and not available elsewhere. Also there’s some bugs (which is why it’s not in official maemo repositories yet). The bugs mainly concern AWT and swing stuff which I don’t really care about anyway.

To install (as root):

$ dpkg -i jamvm_1.4.3-1_armel.deb
$ dpkg -i classpath_0.91-1_armel.deb
$ dpkg -i jikes_1.22-1_armel.deb
$ export PATH=/usr/local/bin:$PATH
$ export CLASSPATH=/usr/local/classpath/share/classpath/glibj.zip:.

The last two commands add jamvm and jikes to the path and add the gnu classpath to the classpath.

Now you can run tomcat on the N800:

  • download tomcat 5.0.30beta from tomcat.apache.org. This is the last version that does not require java 1.5.
  • upload it to N800
  • download this zip file with configuration for tomcat with jamvm
  • copy provided server.xml to the tomcat conf directory. This configures tomcat to be a bit more lightweight than out of the box. It also disables mbeans which seem to require classes not in the gnu classpath. You can reduce footprint further by stripping stuff from the webapps dir (e.g. documentation + examples)
  • use provided jamvmtomcat.sh script to start tomcat (you’ll need to adjust the paths inside). I don’t have a stop script but should be trivial to add.
  • On my N800, startup time after first launch is 3-4 minutes and most of the servlet and jsp examples in the default tomcat both work correctly and the whole thing is quite responsive. The Jamvm process takes about 26MB with tomcat running. That’s all quite impressive considering that jamvm does not include a JIT.

    UPDATE. I’ve continued experimenting and got the startup time down to 2 minutes now. Basically I removed all webapps except the balancer app and my own war file. Some more experimenting with jamvm and other java stuff has learned me that the main performance problem is IO while loading classes. Once that is done, the interpreter is quite fast and usable.

kml2html.xsl

A nice feature in Google Earth is that you can export your placemarks as a kmz file. This is just a zipfile with a .kml file inside. This file in turn is just a xml format that Google uses to list your placemarks.

I spent some time creating a nice xsl file with which you can use to convert these files to html. I use it to publish some of my own placemarks on my website. Effectively, it turns Google Earth into a content management system for publishing information about places.

I do the transformation statically using an ant build file. But you can of course also let the browser do the transformation. However, search engines probably have difficulty handling the kml format. Also, not all browsers can do xsl, e.g. mobile browsers and screen readers. This is why I prefer to generate the html.

The stylesheet has the following nice features:

  • Generates link to Google Maps for each location. It also creates a link to Google Maps pointing to the original kmz file (note you need to set the base url in the build file for that to work)
  • Generates the coordinates of the location formatted using the geo microformat. This allows firefox extensions such as operator and future browsers that support microformats to detect the coordiantes.
  • Produces nice semantic html (makes it easy to style using css).
  • It works for nested folders of placemarks and structures the page using nested unordered lists.
  • Preserves any html you type in the descriptions in Google Earth. So you can add links there and have them appear in the html.
  • Of course includes a link to the original kmz file.

Update. Since posting this I made several updates to the xsl and the css. The link above always points to the latest version of the stylesheet. In the zip file you will also find the css and a ant build file. As part of this update, I also rewrote the text above.

Microformats

I’ve been reading a lot about web 2.0, microformats and the social/semantic/whatever web lately and decided to start supporting some of this stuff on my blog. Specific actions I took:

  • I use the XFN features that come with word press in my links to people I know in the sidebar. I’ve been doing this for a while
  • I joined del.ico.us and added links from that site to my sidebar using the javascript they provide and the nice widgets plugin for wordpress that allows me to mess with the sidebar.
  • I installed the structured blogging plugin (read my hReview compliant review of that).
  • I converted my contact page to be hCard compliant. I wrote it by hand and pasted the HTML but you can also do this using the hCard creator. A nice feature is the download vCard link which converts the hCard to a vCard.

This enables a number of interesting features. For example the tails extension icon now detects stuff on my page; technorati picks up my reviews, etc. Btw. use your favorite search engine to look up most of the terms above, I’m not going to add 20 or so links to this post :-o. Of course this post is highly buzzword compliant so you might have found your way here using some of those words in a search query :-).

bye bye nedstat

Nedstat (a company that has long offered a free site statistics tool) renamed itself to Webstats4U and made a subtle change in their license. As a consequence they may now insult visitors of my website http://www.jillesvangurp.com by displaying advertisements (popups, unders, etc.). While I expect my dear visitors to use a decent browser I can’t agree with these terms of use so I have removed the nedstat counter after having used it from 1999.