Archive for the ‘General’ Category

duh :)

Tuesday, March 9th, 2010

Someone on chat asked me what switches he had to use to execute php on the command-line. He tried to execute a php script, and all the command returned was the contents of the script, instead of executing it.

At least… that was what he claimed. I don’t use php on the cli a lot, so just to be sure i wrote a quick test script, which executed flawless.

So I took a look at the script he tried to execute:

echo html_entitties_decode(file_get_contents($argv[0]));

So the script did exactly what was asked ;) outputting the content of the script itself, instead of outputting the content of the file given as 1st argument to the script.

hi hi.
He overlooked the fact that the 0-key of the argv array holds the name of the script itself, instead of the 1st argument given on the cli :)

Mysterious crashes of netatalk on freeBSD 8

Sunday, February 14th, 2010

I experienced mysterious crashes of the netatalk daemon installed on a freeBSD8 box. The apfd was advertised with mdnsresponder, but at the moment I tried connecting to the shares, the afpd crashed. Nothing showed in the usual logs. I tried several debugging modes, but nothing seemed to give any clue where I had to find the cause of the crashes.
I took another look the /var/log directory, wondering which logfile could provide me with any clue.

Turned out that auth.log was giving information:

Feb 14 08:35:06 zaphod afpd[9740]: twist Erlkoenig.gargleblaster.org to /bin/echo "You are not welcome to use afpd from Erlkoenig.gargleblaster.org."

Aha! this ringed a bell! I recently installed denyhosts, which uses hosts.allow.

A quick look in hosts.allow gave :


# The rest of the daemons are protected.
ALL : ALL \
: severity auth.info \
: twist /bin/echo "You are not welcome to use %d from %h."

So adding:

#netatalk
afpd: ALL: allow

Did the trick… netatalk is working as expected again.

What really happened…

Saturday, January 2nd, 2010

what really happened

The answer is yes

Sunday, November 29th, 2009

Ask Slashdot: Do You Hate Being Called an “IT Guy?”

69.69.69.69

Friday, November 13th, 2009


merlijn@nietzsche 4 ~$ nslookup 69.69.69.69
Server: 10.1.2.5
Address: 10.1.2.5#53

Non-authoritative answer:
69.69.69.69.in-addr.arpa name = the-coolest-ip-on-the-net.com.

Authoritative answers can be found from:
arpa nameserver = I.ROOT-SERVERS.NET.
arpa nameserver = H.ROOT-SERVERS.NET.
arpa nameserver = E.ROOT-SERVERS.NET.
arpa nameserver = K.ROOT-SERVERS.NET.
arpa nameserver = A.ROOT-SERVERS.NET.
arpa nameserver = D.ROOT-SERVERS.NET.
arpa nameserver = G.ROOT-SERVERS.NET.
arpa nameserver = M.ROOT-SERVERS.NET.
arpa nameserver = B.ROOT-SERVERS.NET.
arpa nameserver = C.ROOT-SERVERS.NET.
arpa nameserver = F.ROOT-SERVERS.NET.
arpa nameserver = L.ROOT-SERVERS.NET.