Here is how to install APD (Advanced PHP Debugger) on CentOS 5. Lets start by creating a directory for it to log files to.
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.
My PHP binary was in a different location, so I had to alter the script too.
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.