Joomla 2.5 – suddenly internal links contain Smart%20Search [solution]

In a Joomla 2.5 installation, SEF URLs enabled and URL rewrite using .htaccess enabled I suddenly got internal menu links with URL:s containing Smart%20Search, like:

The link itself does not work, ending up on an error page. I have no explanation why this occurs.

The solution is to go to Menu -> Menus, then select all menus and then click the Rebuild button


Demolition of gas tower in Valby, Copenhagen

The other day I went to watch the demolition of the gas tower in Valby, Copenhagen. The demolition was done by detonating a series of explosive charges in the bottom of the tower. By placing and sequencing the explosions the tower was tipped over to the side with high precision, just like taking down  a tree. I had never seen a demolition using explosives in reality before (only on video) so I was quite excited. Everything went exactly as planned. This is my video.

Slide the bar to 1:04 where the explosion begins. The event was rather big in Denmark. It was broadcasted live in television. See the news clip from TV2 News here.

Switching from iPhone to another brand – don’t forget to turn off iMessage first!

A girlfriend to one of my friends recently decided to leave the dark side and replace her iPhone with an Android (good decision!). However when she was using the iPhone she also had enabled the iMessage texting.

After switching to her new Android phone her friends, that still was using iPhones, tried to text her. Because her iMessage account was still enabled the texts ended up in the Apple void and didn’t reach her. To disable it the SIM-card had to be put into an old iPhone 3 in order to turn the iMessage off. The iPhone she replaced was using micro-SIM but the Android had normal SIM:s so she had a new larger SIM that wouldn’t fit in her old iPhone. The iPhone 3 works with normal SIM cards so that is why a iPhone 3 had to be used to disable it. 

So, if you decide to convert from iPhone to another brand, remember to turn iMessage off in the iPhone first!


Android mail token files fills up my SD card

I use a HTC Desire HD android mobile. My 8 GB SD card was getting full so I removed photos and videos that had already been copied to my PC. But I became a bit curious because of the 8 GB, the images and videos where not consuming the entire space.

To investigate further I connected the android phone using USB to my PC and used the PC:s explorer to dig into the SD-card.

I found out that the mail program stores images and other parts of emails in the Downloads folder on the SD card. After 1,5 years of use there where a significant amount of files there.  

After deleting them i noticed there was a folder called .Mail (i.e. Downloads/.Mail) which contained >21.000 files consuming some 700 MB of space. The filenames began with "token". After some Googleing it seemed by the discussions I found that these are temporary files created each time a message is pushed to the phone. I decided to take a shot and delete them.

After deleting all files in the .Mail folder I opened the mail app on the phone. For a short moment a text was displayed "Preparing SD card". Then my inbox showed up and everything worked normal with the only difference that the mail app seemed a bit quicker now.

My conclusion is that it is probably safe to delete the content of the .Mail folder once in a while to free up some space.



Error message in Apache log file: “Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden”

The error message "Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden" occured in my Apache logfile and the visitor was displayed an error 403 forbidden error page when trying to access a cgi-script written in Perl. The solution was to add the following for the directory in question to my Apache configuration file: 

<Directory /var/www/cgi-bin>
  <Files ~ (\.pl)>
  Options ExecCGI FollowSymLinks
  Options +FollowSymLinks +SymLinksIfOwnerMatch


Remmina on Ubuntu 12.04 problem to connect to Windows 7 with RDP ‘Unable to connect to RDP server’

Suddenly I couldn’t connect to my Windows 7 machine by RDP using Remmina on Ubuntu 12.04. It had worked before and suddenly stopped working. The error message displayed was ‘Unable to connect to RDP server’. Other RDP connections worked fine.

For some reason the problem was solved by editing the file ~/.freerdp/known_hosts and deleting the line with the server having the problem. When connecting again I was asked to accept the certificate and now the RDP connection worked again.


Err 310 ERR_TOO_MANY_REDIRECTS in Chrome and Firefox using Apache’s mod_rewrite

I used Apache’s mod_rewrite in order to direct a couple of domains pointing to the same website using the 301 moved permanently (to avoid duplicate content), i.e. something like this in .htaccess: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^(.*)$$1 [R=301,L]

I randomly got the error message 310 ERR_TOO_MANY_REDIRECTS when trying the different domains in both Chrome and Firefox (other browsers seemd to work). I had decided my site should be reached without "www", so was redirected to also. 

After a while of head scratching I found a couple of forgotten DNS entries. Two of them where outdated. My domain setup for in DNS looked like this (sample IP-addresses): zone:

@  IN  A
@  IN  A
@  IN  A

www  IN  A

But only was valid and had a running web server on it.

I guess what happens is when Chrome/Firefox tries to talk to or .3 and get no response, they add "www" in front of the domain name, i.e. Now it got a response from the webserver saying 301 redirect to Now trying to talk to on or .3 no response, adding "www" and there we have our loop.

Fixing the DNS entries (removed the invalid and .3) fixed the problem. A bit odd and hard to find, and most of all stupid to have the outdated records still in the zone. 


Internal Server Error 500 when trying to install JCE 2.2.6 in Joomla 2.5

When trying to install the JCE content editor for Joomla version 2.2.6 in Joomla 2.5 it failed with HTTP Error 500 Internal Server Error. Directory permissions was not a problem and there was no problem installing other extensions. 


  1. Download the JCE 2.2.6 zip archive to your computer.
  2. Unzip it to a local folder, called for example "jce"
  3. Upload the folder to your Joomla! tmp directory
  4. In the Joomla! backend, go to Extensions -> Manage extensions and go to the box for installation from a folder on the server.
  5. Enter the path where the uploaded folder containing JCE is uploaded, i.e. probably something like /var/www/mysitename/web/tmp/jce and click install.



Remove or add www to URL using Apache mod_rewrite

To avoid a website being considered as "duplicate content" by Google (i.e. the same website appearing under different URLs) it is a good idea to make sure the website doesnt appear as both and This can be achieved by using the mod_rewrite in Apache using the .htaccess file.

To remove "www" from the URL, i.e. the website’s URL should be, your .htaccess should look like this: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^example\.com$
RewriteRule ^(.*)$$1 [R=301,L]

If you instead want to make sure "www" is added, i.e. the website’s URL should be, your .htaccess should look like this: 

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$
RewriteRule ^(.*)$$1 [R=301,L]