Tim Groeneveld

Random musings from the world of an Open Source geek

Usefull DNS advice

| Leave a Comment

<Deepa> Hosting DNS content on a dynamic IP is like trying to have a baby with a dog. Even IF you succeed it’ll still be a freak

(Deepa on #opennic, irc.freenode.net)

Galium 0.29 hotfix

/ | Leave a Comment

What’s fixed in this hotifx?

  • Domain Cron is less verbose
  • Started removing hard coded values inside the domain cron.
  • Fixed a bug in the domain cron; where a domain would not be marked as being updated when it had beed
  • Included the missing ‘switch’ function… woops!

Galium 0.29 hotfix

Galium 0.29 released!

/ | Leave a Comment

Galium 0.29 released!

  • 100% Fixed the confusing template, where logout showed up, without being logged in!
  • 100% You can now (again) switch between local and remote hosting of domains 🙂
  • 90% Users can now add A, AAAA and CNAME records.

How to upgrade?
If you have installed Galium 0.2 or later, updating is as simple as just replacing all the updated files. If not, go to the directory where you installed Galium, and type ‘php ./apps/doUpdate.php’

tim@timg:/var/www/galium$ ./apps/doUpdate.php
=> Galium Cron Service v0.2b
--> Loading configuration ...
--> Connecting to MySQL ...
=> Checking if the database needs an update ...
=> Updating to database version 4
--> Running UPDATE-0002.sql ...
----> OK!!!
--> Running UPDATE-0003.sql ...
----> OK!!!
--> Running UPDATE-0004.sql ...
----> OK!!!
--> OK!

Easy! Download the latest Galium here.

tim@timg:/var/www$ diff -ur galium.old galium | diffstat
 galium/apps/domainCron.php                                |  150 +++++-----
 galium/conf/config.php                                    |    4
 galium/www/Applications/User/Manage.php                   |  149 ++++++++-
 galium/www/Libraries/Backend.php                          |   32 ++
 galium/www/Skins/bea../Template.php                       |   16 -
 galium/www/Skins/bea../Temp..s/Man../Dom..Records.php     |   18 -
 galium/www/Skins/bea../Temp..s/Man../lis..omains.php      |    6
 12 files changed, 273 insertions(+), 103 deletions(-)

giv.ing some lov.ing to Galium

/ | Leave a Comment

In around six hours (in other words, in 24 hours, knowing me) I am going to be releasing an update to Galium, which will finally allow (after how many weeks?) using the name servers from the top level domain, but allowing users to specify their own DNS records. In other words, DNS records would be hosted by us, which would remove the need for glue servers in some cases.

Also, in other news, the .gopher and the .geek top level domains either are – or will soon be – powered by Galium! Next step; world domination!

MyBanco 0.05 out!

/ | 1 Comment on MyBanco 0.05 out!
  • 100% Detect if all required modules are in PHP
  • 90% Insert SQL dump into MySQL
    • Could be improved on the SQL file import side

Coming to the next release, which is due in seven days, is the ability for people people to gain money for posting on a forum!

MyBanco v0.05 is coming

| Leave a Comment

The new version of MyBanco will be out within the next few hours, boasting a few new handy features, such as:

  • An installer, which will insert the SQL dump into MySQL automatically.
  • A few minor bugs fixed.
  • Patches for SMF to enable the ability for people people to gain money for posting on a forum.

Watch this spot 🙂

My Xen experience

/ | Leave a Comment

No! When I Xen, I am not talking about a relationship to foreign material. Well, that is – not exactly. Xen is an open source hypervisor. Think: VMware, but much, much cooler.

I was talking to Tim Post, about a project that I was completing for ShareSource2. Basically, the conversation came to the point where I said that I was using OpenVZ for my server virtualization. Tim then came to me and said “Why don’t you just use Xen”.

Well, I was not born yesterday – I did tell him that I had tried Xen, and that when I tried it – it just refused to work.

Then Tim pointed me to Xen unstable, a mercurial repository containing a version of Xen that does not need a new CPU to actually boot up.

Xen unstable, the version I checked out yesterday, is actually tagged as being “3.2.0-rc4″, which probably means that it is coming it’s way to becoming a nice stable Xen product that people other then me have actually been able to use.

This is what I used on my Debian to be able to install a Xen-enabled kernel:

~# mkdir Xen
~# cd Xen
~# hg clone http://xenbits.xensource.com/xen-unstable.hg
[[ wait for around 3 minutes while it grabs Xen’s history
~# cd xen-unstable.hg
~# apt-get install bin86 bcc
~# make world
[[ Note: this step will also check out a kernel ]]
~# sudo make install

Then I had to add an entry to my /boot/grub/menu.lst which looked like this:

title Xen 3.2 / XenLinux 2.6
kernel /boot/xen-3.gz console=vga
module /boot/vmlinuz- root=UUID=66559e96-e405-4a1d-be28-b8caf5b5b89d ro console=tty0
module /boot/initrd-

Reboot, select my new kernel, and faster then you can say “WOW IT WORKS” it was booting me into a brand new (well, actually, my OpenVZ kernel was 2.6.20 – so a brand old) kernel

To try Xen out, just go over to http://jailtime.org and download an image of a nice operating system (I chose CentOS 5.1). When you have downloaded your image, do the following:

tar -xvf {downloaded image name}
ls -lar
xen create -c {smallest file (usually)}

and Voila! First thing you should be introduced to is a nice Grub screen welcoming you to your Xen experience.

I am still as of today yet to actually have built my own Archlinux or Frugalware Xen image. If anyone knows how to do this successfully, please drop me a line or leave a comment!

ShareSource is getting RSS feeds

/ | Leave a Comment

ShareSource will finally get propper RSS feeds! After how long? There has been site news RSS feeds for quite a while in ShareSource. All you have to do is add the feed http://sharesource.org/api/rss/site.rss, but this update will actually mean that there is support for RSS feeds with project news, commit updates and much, much more!

The push date that will add support for cool RSS will be the 16th August 2008!

See you when you get there 🙂

Windows version of MyBanco released

| Leave a Comment

I have just added a zip version of MyBanco at the download site, so that people who are not advanced enough for Linux or OS X (only mucking around… seriously) can download MyBanco and upload MyBanco to thier webhost.

You can download MyBanco from the usual place. Remember, it is licensed under the Affero General Public License, which is a special license saying that any source code that is changed in MyBanco must be shared with the network that the modified code runs on. That is, if all you do is run MyBanco on a local network, say for a University, you need to only share the modified code with the university. If the code runs on a public network such as the internet, the modified code must be shared with the internet.

Making external applications add money to accounts in MyBanco

/ | Leave a Comment

I got an email earlier this morning, asking me how hard it would be to “make something that can activate a transaction when an action happens in another code”. I thought about it for thirty seconds, and realised that it would not be too hard. Infact, it was super easy to do.

There are two ways that it can be done, the MyInfo way, which is complicated, and the MySQL way, which will be the easiest (for the moment). A simple transaction taking place will take about 12 lines of code.

In Psuedocode:

mysql_connect("database.server.com", "root", "password");
if (mysql_error) die "Can't connect to DB";
$SQL = 'INSERT INTO `transactions` (
          `transactionTime`, `from_aid`,
          `to_aid`, `amount`, `description`
        ) VALUES (
          UNIX_TIME(), "$from", "$to",
          "$amount", "Transaction from app"
if (mysql_error) die "fail.";

And that is pretty much it. Not only does it add money to an account (the $to variable)… but it takes it out of an existing account in MyBanco. The only bad thing with using this is that there are no checks done to ensure that the central bank account (the $from) does actually have the right amount of money in there.

Adding this is done with a simple peice of code (in PHP):

if (!$aid) return array('error' => 982);

$SQL = 'SELECT SUM(`amount`) as `positive`
	FROM `transactions`
	WHERE (`to_aid`="' . $aid . '")';

$mr1 = mysql_fetch_array(mysql_query($SQL));
$money_pos = 0;
if($mr1) {
        $money_pos = (is_numeric($mr1["positive"])) ?

$SQL = 'SELECT SUM(`amount`) as `negative`
        FROM `transactions`
        WHERE `from_aid`="' . $aid . '"
                AND `from_aid`<>`to_aid`';

$mr2 = mysql_fetch_array(mysql_query($SQL));
if($mr2) {
	$money_neg=(is_numeric($mr2["negative"])) ?

return number_format($money_pos - $money_neg, 2);

Pretty easy, huh? Now all you have to do is before you insert the row into the transactions table, make sure that __bank_amountForAccount($from) is >$amount … and then you will never have “magic” money being circulated around the MyBanco bank system that ultimately should not exist.