Joomla! templates looking strange in MSIE8

Some Joomla! templates looks nice in all browsers except Microsoft Internet Explorer 8 (IE 8). One easy solution is to add the following line to the <head> section of the index.php for the template in question: <head>

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

Be careful to check that your site works as expected after applying this solution.

How to move a osCommerce site

When you move an osCommerce installation from one webserver to another it often isn’t possible to just move it and update your DNS-names, unless the conditions, like paths and database users etc are exactly the same. This is a step by step guide how to do it, and if you find something that I didn’t catch, please let me know (by the Contact in the menu).

Read more

Remove control characters (^M) by search and replace in vi

If you edit a text file in a UNIX or Linux environment that has it’s origin in the DOS or Windows world, you will see that every line ends with the control character ^M. The reason is that the UNIX or Linux world only use one control character to mark an end of line and in the DOS or Windows world this is done by two control characters.

The control characters will be automatically converted if you use ASCII mode when transferring the file by FTP between the UNIX or Linux world and the DOS or Windows world.

However, if you end up with a text file in the UNIX or Linux environment that for some reason didn’t get its end of line control characters converted, you will see that every line ends with a ^M. Those ^Ms can easily be stripped away by using the search-and-replace function in the vi editor. This requires that you have a basic knowledge on how to edit files in vi.

To search and replace the ^M you use the search and replace command %s. The format for this command is:

(press ESC key once)
:%s/TEXT/REPLACE/g

where all occurences of the TEXT will be replaced by the word REPLACE. Now we want to replace a control character, so instead of TEXT we should enter ^M. If we just type the ^ character and then the M character on our keyboard, the search and replace function will not match the ^M seen in our text file. This is because they are control characters, i.e. control-M (press and hold the CTRL-key while pressing M). If we try to just press CTRL-M after the :%s/ you will get an error message.

This is because the CTRL-M is the same as pressing the Enter key. To tell vi not to interpret the CTRL-M you need to escape it. This is done by pressing and holding CTRL in the same time as the V-character once before pressing CTRL-M. In the example below, pressing and holding CTRL while pressing the V-character is shown as a ^V and pressing and holding the the CTRL while pressing the M-character is shown as a ^M.

So to search and replace all ^M in the entire file in vi you should do:

(press ESC key once)
:%s/^V^M//g

Calibrate Vivotek PT7137 from URL

The Vivotek PT7137 is a pan-tilt network camera from Vivotek.

After panning and tilting for some time, especially after hitting the boundaries a couple of times, the camera is in need of calibration. You can see this if you have some predefined postition and selecting it doesn’t bring the camera centered to the selected position.

Calibrating the camera can easily be performed by logging in as the administrative account (root) and selecting the Maintenance in the menu. The Calibrate button will immediately calibrate the camera.

However, in some cases you would like to calibrate the camera directly by entering a URL or by using a script.

Read more

How to install both Windows XP and Easy Peasy (Ubuntu) on ASUS EEE Pc 900

Windows XP on ASUS EeePC

What you need

  • Two USB memory sticks. 2-4 GB is good for Windows and 2 GB for Easy Peasy. Sticks above 8 GB have been problematic for me.
  • A Windows XP installation CD with SP2. If you don’t have at least SP2 included, the install will blue screen. To update your Windows XP with SP2, follow this guide. If you upgrade your Windows XP installation with SP2 in a directory on the hard disk according to the Read more

Rebuild the journal in a ext3 journaled filesystem

The symptom of a broken ext3 journal is that the system will boot normaly but after a while the filesystem will be remounted read only and according to the log there are problems reading a block in the journal.

Boot on a rescue cd or boot but make sure the filesystem is in read only mode.

In this example i use /dev/md0 (the software raid device), becuase when I had this problem it was an ext3 journaled filesystem residing on a software raid that was causing trouble.

Issue the following commands

# fsck /dev/md0
# tune2fs -O ^have_journaled /dev/md0
# mount -n -o remount,rw /dev/md0
# tune2fs -j /dev/md0
# mount -n -o remount,ro /dev/md0
# fsck /dev/md0
# reboot

The first tune2fs removes the current journal on the filesystem (-O ^have_journaled). The second tune2fs (-j) recreates it. In between the filesystem must be mounted read only in order for the new journal to be written.

How to change timezone and synchronize time in Debian Linux

To ensure that things are being logged with correct time stamps in your system logs, it is important that your system is configured for your particular timezone and that your system clock is being synchronized to a correct time source. Normally when you set up your Debian Linux system the correct time zone will be choosen. If the time zone is set wrong for some reason it needs to be adjusted.

To check your current time zone issue the command:

# date
Wed Jul 15 11:05:15 UTC 2009

Read more

Horde Groupware Webmail alarms.php memory problem

To enable alarms in Horde Groupware Webmail you must add the following to your crontab:

# Horde Alarms
*/5 * * * * /usr/bin/php /var/www/horde/scripts/alarms.php

Depending on your system, the paths above might be different.

You may experience the following error message when the script is run by cron:

Allowed memory size of 8388608 bytes exhausted (tried to allocate 147 bytes)

To resolve this, edit the file /etc/php4/cli/php.ini. Depending on your system it might be located somewere else on your particular system. Change the memory limit to 128 MB by changing the memory_limit parameter:

memory_limit = 128M

The above problem has occured with Horde Groupware Webmail version 1.2.3 but might occur in other versions as well.

Ubuntu eee: Intermittent DNS problems with Windows Vista Internet Connection Sharing (ICS)

When connecting an Asus EeePC 900/901 running Ubuntu eee 8.04 (‘Easy Peasy‘) to the Internet through a Windows Vista machine running Internet Connection Sharing (ICS) and you are experiencing intermittent DNS-problems, the problem can be related to IPv6 being enabled but there is no IPv6 Internet connection (only IPv4). In Firefox there is a DNS-error displayed, but hitting reload one or more times will bring up the desired web page. Internet access can also be experienced as slow or sluggish.

The problem can be that IPv6 is enabled in both the Windows Vista and the Ubuntu machine but there is no IPv6 Internet connection. The problem can be resolved by disabling IPv6 in Windows Vista running ICS. You can of course solve it by disabling IPv6 in the Ubuntu machine but then you have to disable it in every client inte network using the ICS, so it is more efficient to disable it in the Windows Vista running the ICS.

Instructions how to disable IPv6 in Windows Vista is found here. Don’t forget to enable it once you hook up your Windows Vista machine into an IPv6 enabled Internet connection Wink

Ubuntu eee: Youtube video problem

In Ubuntu eee 8.04 for Asus EeePC 900/901 (‘Easy Peasy‘) there is a problem when trying to look at Youtube videos. Almost all videos gives a message saying that it is not currently available.

The problem is the flash player included in the Ubuntu eee installation. To resolve the problem:

  1. Try do uninstall ‘flashplugin-nonfreebeta’ using the Synaptics package manager.
  2. Go to http://get.adobe.com/flashplayer, download and install the latest flash player for Ubuntu 8.04.
  3. Restart Firefox.