Even though you have the two sites split up and using two different php.ini files, CRON will still use whichever php.ini file the PHP-CLI is configured to use. So, to figure out which php.ini CRON is using, this is the command to use:
php -i | grep php.ini
If PHP-CLI happens to be using a php.ini file that you didn't expect it to be using (such as /usr/local/lib/php.ini
) then that will be the key to figuring out why you're seeing Xdebug errors in the logs.
It turns out that the /usr/local/lib/php.ini
file had these two values set:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626"
zend_extension = "xdebug.so"
That was causing the error from the php script that was run by CRON (i.e. PHP-CLI) because zend_extensions need the full path to the module. This is also stated in the Xdebug documentation: http://xdebug.org/docs/install
So, to get rid of the error, just comment out that line (or just remove it). You could also comment out or remove the extension_dir
line as long as you are not loading any other modules such as:
extension = memcached.so