oid vs bytea in Postgresql

Okay, here is the deal, I am working on a project which requires me to store files in my database. But I have recently just switched to postgresql from mysql, so I had to do some research on what methods postgresql offers for file storage. In mysql GLOB would have been my choice, but postgresql offers two methods, BYTEA which is postgresql’s answer to GLOB, or store the files in Large Objects (oid).

I asked around to find out what method would be the fastes, but I could not find the answer I was looking for, so I ended up spending the night testing it for myself, this blog will show the results.

Læs videre “oid vs bytea in Postgresql”

Hotmail just sucks

This night I did a minor update on my mail server, I updated the dkim-milter to a newer version and removed the dk-milter filter from the server.

With the update some bonuses came along, gmail.com and yahoo.com now looks at my mails as “in-good-stand” mails, and this is a major bonus.

However Hotmail still look at my mails as Junk, and I don’t understand why, I am using their rather out-dated Sender-ID protocol which is perfectly working (tested with sa-test sendmail). The headers which is received by hotmail is quite as useful as a lollipop with cock flavour, god damnit Microsoft fix your systems !

Getting the power of sftp chroot in debian

Background

As many people might know, I am a bit security paranoid when it comes to my servers and sending stuff over the Internet in plain text. Therefore have I been using SFTP and SSH when I needed something sent over the Internet to my servers.

SFTP does however have a downside, in order to get the security of data encryption using sftp you will have to create an user account on the server with a valid shell, and therefore would every user have access to the whole system in read mode, which is a security risk.

One of the solutions would be to make a chroot for each user on the server, but this is both time consuming and a complete waste of space.

I finally found a good solution, there is a patched version of OpenSSH which gives a chroot feature of making sftp only connections, this however does not allowed the user to use a shell also, it’s either sftp or ssh, not both, if you need this, you will have to create a chroot for every user.

http://www.minstrel.org.uk/papers/sftp/

There is however a problem with the new patch, the author only give guiding for a source installation or using OpenBSD, but my servers are running Debian Etch and Ubuntu (7.04 and 7.10), so there is some new steps in order to get it working the debian-way.

Læs videre “Getting the power of sftp chroot in debian”

Screen: Tips & Tricks

In this article I will describe a very useful program: GNU Screen. Usually this program is used by people who have a shell account on a Unix server. But it can be also helpful to people who haven
’t yet started to use a terminal or even Linux/Unix at all.

read more | digg story

Nogle sure opstød

Mens jeg var på pause fra arbejdet fandt jeg diverse hjemmesider efter et par søgninger, så finder man frem til et firma der hedder LN Webdesign .. Og nøj hvor var den side grim ! Og det er endnu et eksempel på udnyttelse af Open Source software; Han bruger Joomla! cms til at styre de sider han “laver”, for jo han laver dem, siger han da, eller han skriver det i bunden af hver side han har lavet, og på flere af dem glemmer han endda at gøre opmærksom på at det er et Joomla! system der ligger bag. Hvilket han skal i følge af deres licens, da han har brugt projekt til kommercielle formål.

Kæft sådan nogle ting gør mig sur, alt hvad han har lavet ligner lort og noget min niece har smidt rundt på at A4 ark …

Om jeg fatter folk overhovedet gider at kalde sig selv designer når de ikke engang er gode til det, det er først godt når det rent faktisk er overskueligt og simpelt, for ikke at tale om standardiseret …

Skiftet til lighttpd

Så skete det, jeg har udskiftet Apache2 med den lille lighttpd, det var ikke smertefrit, da den ikke understøtter .htaccess, så det blev til en masse legende rundt med url.rewrite og url.redirect. Men det viste sig så at det eneste det krævede var:

$HTTP[“host”] == “www.zephid.dk” {
url.redirect = ( “^/(.*)” => “http://www.zephid.dk/$1” )
}
$HTTP[“host”] == “zephid.dk” {
server.error-handler-404 = “/index.php?error=404”
}

Optimize PHP and Accelerate Apache

As the load on an application increases, the bottlenecks in the underlying infrastructure become more apparent in the form of slow response to user requests. This article discusses many of the server configuration items that can make or break an application’s performance and focuses on steps you can take to optimize Apache and PHP.

read more | digg story