Posts Tagged ‘Zend’

Zend_Form apply Zend_Filter to all form elements

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 ›››

Building Netbeans from Source under OS X 10.6

By Mark Davidson on February 27th, 2010

Here is a quick run down of how to build and run Netbeans from source under OS X 10.6. I highly recommend giving this a go as there are always lots of good features being added to Netbeans at the moment I am trying out the Zend support in the latest version.

  1. Install Ant & Java SDK I did this by installing the OS X developer tool kit or follow the guide here http://www.asceticmonk.com/blog/?p=388
  2. Download & Install the latest version of Mercurial – http://mercurial.berkwood.com/
  3. Clone the main branch
    `hg clone http://hg.netbeans.org/main/`
  4. Create a .antrc in your home directory and add `ANT_OPTS=”-Xmx512m -XX:MaxPermSize=256m”` to the file.
  5. Change into the directory main
    `cd main`
  6. Then just run ant
    `ant`
  7. It takes about 30 minutes the first time on my MacBook Pro if it builds with no errors your good, to run it you need to run the built file `./nbbuild/netbeans/bin/netbeans`