Debugging some php..
apt-get install php5-dev
pecl install xdebug
edit php/conf.d/xdebug.ini - xdebug autoloads if correct, check phpinfo(). Set path to [..].so file for xdebug, set xdebug.profiler_enable_trigger = 1
and xdebug.profiler_enable = 0
install kcachegrind (or webgrind from google code)