March, 2010


24
Mar 10

Some people just don’t get it

For some time I’ve been involved with Soleus, a community-driven non-commercial association which hosts Virtual Private Servers. For quite some time some commercial VPS hosters have been really bothered/feel threatened by Soleus. Currently there are some issues with both our frontend and our storage systems, and this culminated in this childish action… What I don’t [...]

20
Mar 10

Favorite artwork?

Last week I started my “old” hobby again. Postcrossing! I started this hobby in August 2009, but after October I forgot to send new post cards. Also, I didn’t really know what to do with all the received cards and each time you send one, you get one back. It would be nice to hang [...]

9
Mar 10

duh :)

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_entities_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 :)