Archive for May, 2010
By Mark Davidson on May 28th, 2010
So recently at work I have been doing a lot of work with the Zend Framework, but I was having some issues with magic_quotes_gpc
being turned on in the PHP configuration of the server. The easy thing to do would be to disable magic_quotes_gpc in the php.ini and that solves the issue. However this was not an option in my case, as I didn’t want to fiddle with the configuration in case it broke anything else.
I had a look around for a solution and found one on Phil Brown’s Web Development Blog his post
Zend Framework Forms and magic_quotes_gpc which explains how to use Zend Filters to combat this issue. His solution works perfectly but you have to set the filter for each form element individually and I found this a bit of a chaw.
So I looked around to find a way of applying it to all elements within the form.
Here is the solution I came up with this is all the code you need to get it working. I am doing this for the Strip Slashes filter but will work with any standard or non standard filters.
Read & Comment ›››
By Mark Davidson on May 28th, 2010
A really quick post this time to just take note of the strings tool which is part of the Binutils collection of binary tools
The strings tool allows you to print all printable characters in a given file or files. This can be very useful for a number of different tasks from extracting metadata from a file to retrieving a certain level of information from unknown executables such as what URLs it has contained within it.
Read & Comment ›››
By Mark Davidson on May 16th, 2010
So I came into work the other day and one of the SSH sessions I had left open with a screen session had an interesting error.
Suddenly the Dungeon collapses!! - You die...
Now that is one of the weirdest errors I have ever seen come out of any program on any platform. Apparently the error is a throw back to the game nethack which is kind of cool.
My screen session seems to have died with some memory issue which is something I have never seen happen before
May 14 04:44:42 chronos view: *** glibc detected *** view: double free or corruption (!prev): 0x0000000000936d50 ***
May 14 04:44:21 chronos kernel: [4894494.908208] screen.real[3934]: segfault at 7fffaa1d6a10 rip 4055ee rsp 7fffaa1d6a10 error 6
Just a post to note what this error is related to and that if it happens to you just check your syslog most likely a similar error will show up.