Author Archives: Simon

Confixx Can’t locate Confixx/Filter.pm after Upgrade to Debian Lenny

I received this error message after updating a Confixx Server to Debian Lenny when you try an run the Confixx counter script. This is how to fix the problem:

1. Change into the Confixx Admin directory

cd /root/confixx/admin/CPAN

2. Unpack the updater archive

tar -xzf Updater-1.0.6.tar.gz

3. Change into the directory

cd Updater-1.0.6

4. Then build the updater package

perl Makefile.PL
make
make install

This lead to a new error:

Can't locate XML/DOM.pm

5. To get rid of these errors you need to install the following packages;

aptitude install libxml-dom-perl libproc-process-perl

Thats it you should be able to run you Confixx Counter script again give it a try:

/root/confixx/confixx_counterscript.pl --dbg --force-all

Howto install htscanner

I have started using Suphp on some of our confixx servers. Suphp hast one big advantage over mod php it executes PHP scripts with the permissions of their owners. Which is extremely useful on multi domain servers. Otherwise you always have the problem that files uploaded via FTP have different permissions than files upload via http. For example plugins uploaded via the wordpress backend or photos via php gallery. One of the big downsides of Suphp for us is that you cannot use .htaccess files for mod rewrite and so on. This is were htscanner comes along this is the description. Allow one to use htaccess-like file to configure PHP. sounds good 🙂 You need to perform the following steps to install htscanner on debian or ubuntu:

1. Download htscanner:

wget http://pecl.php.net/get/htscanner-0.9.0.tgz

2. Unpack the archive:

tar -xzvf htscanner-0.9.0.tgz

3. Install dependencies:

aptitude install php5-dev php-config

4. Change into the htscanner directory:

cd htscanner-0.9.0

5. run phpize

phpize

6. Configure htscanner

./configure --enable-htscanner

7. Then make and make install

make && make install

8. This should have installed htscanner at the end of the install you should see the install path.

9. Create a file to get the htscanner module loaded:

vi /etc/php5/cgi/conf.d/htscanner.ini

10. With the following content:

extension=htscanner.so

11. restart the Apache web server and you can use .htaccess files again.

Confixx on Debian Lenny and Umlautdomains

Confixx can handle IDN (international domain names) domains including Umlaute (ä,ü,ö). Normally you should be able to type your domain into the Confixx webinterface including (ä,ü,ö) and Confixx should generate punycode for the apache vhost config and the dns zone files. This stopped working in Debian Lenny due to the apache package in Lenny which was compiled with LANG=C. To get this function to work again open the following file with your favorite editor:

vi /var/www/confixx/html/include/idn_functions.php

If you are using Suse you will need to look under /srv/www. And add the following line at the top of the file under the comments:

setlocale(LC_ALL, "de_DE.UTF-8");

Thats it IDN domains should work again.

Ubuntu 10.04 Lucid Window Buttons On The Left

To get the close and minimize buttons back on the right hand side do the following:

1. Press Alt + F2 and enter:

gconf-editor

2. navigate to /apps/metacity/general/button_layout

3. set the key value to:

:maximize,minimize,close

Thats it log out or restart metacity and your buttons should appear back on the right hand side.

Debian Lenny Possible missing firmware /lib/firmware/bnx2-09-4.0.5.fw for module bnx2

If you see this message after running aptitude upgrade with a Kernel update:

W: Possible missing firmware /lib/firmware/bnx2-09-4.0.5.fw for module bnx2

Do not reboot your server or you will be left without any network. Please edit your apt sources.list file and add the non-free repo. For example it could look like this:

deb http://ftp.hosteurope.de/pub/linux/debian/ lenny main non-free
deb-src http://ftp.hosteurope.de/pub/linux/debian/ lenny main non-free

deb http://security.debian.org/ lenny/updates main non-free
deb-src http://security.debian.org/ lenny/updates main non-free

Please edit the line for your standard apt server and for security.debian.org to receive possible security updates. Then run

aptitude update

Now we can install the missing firmware for our broadcom network card:

aptitude install firmware-bnx2

Check if the firmware has been installed correctly:

web99:~# ls -lha /lib/firmware/
total 212K
drwxr-xr-x 2 root root 112 2010-02-01 12:25 .
drwxr-xr-x 11 root root 4.2K 2010-01-20 15:36 ..
-rw-r--r-- 1 root root 104K 2009-08-04 07:00 bnx2-06-4.0.5.fw
-rw-r--r-- 1 root root 101K 2009-08-04 07:00 bnx2-09-4.0.5.fw

We need this version bnx2-09-4.0.5.fw which you can see in the reported error message above.

Thats it you can carry on and reboot your server.

Ubuntu Karmic mount Windows partition as user

With Ubuntu versions prior to Karmic you could mount windows partitions as a normal user. After typing in the root password you could allow the user to mount a windows partition after ticking the box remember this the user could do this himself in the future. Easy going that’s how it should be with Ubuntu for some reason that does not work any more. And this is the solution:

1. Create a file named:

vi /var/lib/polkit-1/localauthority/50-local.d/nautilus.pkla

2. Copy the following content into the file:

[Allow users to mount with nautilus]
Identity=unix-group:simon
Action=org.freedesktop.devicekit.disks.filesystem-mount-system-internal
ResultAny=no
ResultInactive=no
ResultActive=yes

That’s it easy once you know how it’s done.

Ubuntu Karmic change CPU Frequency as user

With Ubuntu versions prior to Karmic you could change the CPU Frequency as a normal user. After typing in the root password you could allow the user to change the CPU Frequency after ticking the box remember this the user could do this himself in the future. Easy going that’s how it should be with Ubuntu for some reason that does not work any more. And this is the solution:

1. Create a file named:

vi /var/lib/polkit-1/localauthority/50-local.d/gnome-cpufreq.pkla

2. Copy the following content into the file:

[Allow users to set the CPU frequency]
Identity=unix-group:simon
Action=org.gnome.cpufreqselector
ResultAny=no
ResultInactive=no
ResultActive=yes

That’s it easy once you know how it’s done.