Zend Framework: Writing an IN-Clause with Zend_Db

I’m currently running a little database analysis to see how many of our users might be affected by Gawker’s breach of security the other week. Since we use Zend Framework, Zend_Db is our weapon of choice. Running the queries I noticed, that Zend_Db doesn’t seem to support an IN-clause with a straight fetchAll(). The IN-clause is only supported when I wrap my statement with Zend_Db_Select, which is something I rarely do....

December 19, 2010 · 2 min

Debugging Zend_Test

Sometimes, I have to debug unit tests and usually this is a situation I’m trying to avoid. If I have to spend too much time debugging a test it’s usually a bad test. Which usually means that it’s too complex. However, with Zend_Test_PHPUnit_ControllerTestCase, it’s often not the actual test, but the framework. This is not just tedious for myself, it’s also not the most supportive fact when I ask my developers to write tests....

September 20, 2010 · 3 min

Looking for Two PHP Developers in NYC

Hey everyone, it’s my sincere pleasure to announce that we’re looking to fill two positions for PHP developers (entry/junior) in NYC. Expectations This is what we look for from candidates: A strong and firm knowledge of PHP5 First hand experience with the Zend Framework You’ve heard of PHPUnit and TDD An idea of what a HTTP request is and the different applications that take part in one You heard of CouchDB, MongoDB or Redis (generally “NoSQL”) before Last but absolutely not least:...

August 12, 2010 · 1 min

PHP, APC and sessions

Playing with redis/Rediska and sessions, I wanted to get more numbers to compare this solution to a traditional MySQL-based approach which also made me revisit the idea of a CouchDB-based session handler for Zend_Session. Implementing this handler, I ran into a weird issue: Fatal error: Undefined class constant 'ALLOW_ALL' in /usr/home/till/foo/trunk/library/Zend/Uri/Http.php on line 447 Call Stack # Time Memory Function Location 1 0.7357 3914816 Foo_Session_SaveHandler_Couchdb->write( ) ../Couchdb.php:0 2 0.7358 3916600 Foo_Couchdb->query( ) ....

May 26, 2010 · 3 min

Zend Framework: Slow automatic view rendering

So I posted something on Twitter today, which wasn’t exactly news to me. I was more or less pointing out the obvious. From a couple follow-up tweets, I guess, I need to explain more. The idea My thesis is that there’s a gain in page rendering time when I disable automatic view rendering and use explicit render calls ($this->render('foo');) inside my controllers. And to cut to the chase, there is. On our app, I measured a 12% improvement using Xdebug’s profiler — simple before-after-style....

March 29, 2010 · 2 min