PHP: So you'd like to migrate from MySQL to CouchDB? - Part I

Update (2009-10-13): I posted part II! This is the first part of a series. I’ll start off by introducing CouchDB — from a PHP side, then I’ll demo a couple basic use cases and I later on, I’ll dive into migrations from MySQL. My idea is to introduce CouchDB to a world where database-driven development generally refers to MySQL. By no means, this is meant to be disrespectful to MySQL, or SQL-databases in general....

October 31, 2009 · 5 min

A case for PEAR and PHP4 (Or, why BC is important!)

Every once in someone likes to argue that PEAR is all fugly PHP4 code and why you should not use it, and instead go and use another framework or component library. Most of those people also say that they looked at or used PEAR x years ago and then act all surprised when someone else disagrees. In related (BC) news, most people probably read my blog because of Zend Framework, and I remember that one of the reasons I sold my clients on Zend Framework was a supposedly backward compatibility and clean API....

September 22, 2009 · 5 min

My first PHP Unconfernce

I went to Hamburg last weekend to visit the PHP Unconference, which was probably my first conference ever. I’ve been to a couple barcamps and other smaller events, but anyway, this felt more like a real conference to me. That is, if I exclude ALA and the various ad:tech’s I had to go to. The reasons why I usually avoid tech conferences include foremost the price tag (working for myself, I can technically label it as an expense, but I still have to pay for it), doubts that it’ll be worth it in terms of knowledge gained and probably time....

September 18, 2009 · 3 min

PHP performance III -- Running nginx

Since part one and two were uber-successful, here’s an update on my Zend Framework PHP performance situation. I’ve also had this post sitting around since beginning of May and I figured if I don’t post it now, I never will. Disclaimer: All numbers (aka pseudo benchmarks) were not taken on a full moon and are (of course) very relative to our server hardware (e.g. DELL 1950, 8 GB RAM) and environment....

May 31, 2009 · 3 min

Cannot send headers; headers already sent in , line 0

Yesterday, I started upgrading a test server to Apache 2.2 and PHP 5.2.9 and ran into this is a problem, which then bugged me for a good day. So here’s the run down: My test.php: <?php ob_start(); system('file -i -b /path/file.txt'); $contents = ob_get_contents(); ob_end_clean(); var_dump(headers_sent($file, $line), $file, $line); My test2.php: <?php $contents = shell_exec('file -i -b /path/file.txt'); $contents = trim($contents); var_dump(headers_sent($file, $line), $file, $line); test.php claims that headers were send, while test2....

April 9, 2009 · 1 min