eggfriedrice.com

A Kind of Magic

June 1st, 2007

Whoever thought Magic Quotes in PHP was a great idea should be banned from using a computer ever again.

I’ve only just started using PHP properly (enough to fall in love with Smarty, more later) and this slashes appearing in all my strings thing has been bugging me. I’m used to running strings through an escape function before shoving it into a database because that’s what we do. Having all get/post strings escaped is JUST ANNOYING AND STUPID. And you can’t just disable the ini setting in the PHP code because by the time it’s running your code it has already bastardised your data. Luckily though, you can disable it in a .htaccess really simply:

php_flag magic_quotes_gpc off

And now sensibility reigns supreme once again and all is well in the world of code.

Apparently Magic Quotes will be disabled by default in PHP 6, in the meantime I might suggest they rename them Moron Quotes.

<rant>
Talking of morons, Virgin Media is sucking badly at the moment, I can only reach my own blog by using an SSH tunnel into a box in Sussex and then out again. I can’t reach blogspot, some other Google sites, Youtube AND WORST OF ALL, I haven’t been able to read UserFriendly for THREE DAYS. In all seriousness, having called Virgin Mediocre/Telewest and spoken to four different phone monkeys who wouldn’t know an ethernet cable from a cheese sandwhich I can only assume that the system normally works because they’re not allowed to touch it.

Highlight was when I was telling monkey three about how traceroute was showing packet loss after a particular hop clearly labelled blueyonder he started to tell me how to disable pop up blocking in Internet Exploder. Upon being informed that I’m using Firefox he suggested I call the makers of Firefox to ask them for help. Excuse me while I open a new bug on bugzilla…

Apparently this issue is due to be fixed tomorrow. The Virgin Mediocre help page shows the estimated fix time as being seven hours ago, so it’s going really well.

Virgin Mediocre: fairly cheap, fairly fast, run by morons, fine for home use, not to be used anywhere near a business environment.
</rant>

In other news: I’ve done my exams, just need to go into college once more on Tuesday to tick some boxes and then that’s me educated! I need to work my arse off this weekend to finish off a website in time for it’s launch on Monday and then I can have a couple of days off. Which is good because I’m itching to solder anything to something else…

Leave a Reply