OK, this is a loop so it's tricky to know where to start. OK, say I have PHP 5.0.5-r5 installed and pecl-apd. All is working fine. I update world and get bumped up to php-5.1.2, but pecl-apd isn't upgraded. Fine, I run a PHP CLI script and it tells me APD is using the wrong zend engine version. I re-emerge pecl-apd and it's all good again. On the next update world my PHP will be downgraded to 5.0.5-r1 again. Then I need to re-emerge pecl-apd again, then update world wants to upgrade to PHP 5.1.2 again. I'm sure you get the picture. Anyway, happy to provide any debugging information I can, just let me know what you need.
Sorry, nothing we could do here... You need to package.mask 5.1.x *** This bug has been marked as a duplicate of 48195 ***