Here is how to install APD (Advanced PHP Debugger) on CentOS 5. Lets start by creating a directory for it to log files to.
cd /tmp mkdir apd chown apache:apache apd
We need to remove ioncube, or it will cause errors.
rpm -e php-ioncube-loader
Now we can install APD, via PECL.
pecl install apd
Add the following to php.ini.
[apd] zend_extension=/usr/lib64/php/modules/apd.so apd.dumpdir=/tmp/apd apd.statement_tracing=0
My PHP binary was in a different location, so I had to alter the script too.
cd /usr/bin/ vim pprofp
Change /usr/local/bin to /usr/bin and save the file.
You also need to ensure PEAR is in your include path (/usr/share/pear) for the script to work.