I'm running Oneiric as a LAMP development server, and have xdebug installed. It works fine, but since I set up my email so that root mails are forwarded to my gmail, I keep getting the following:


Cron <root@pingu> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

mail body

PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0

Every 30 minutes. The cron job is in /etc/cron.d/php5 - it looks like it's to ensure sessions are automatically cleaned.

The cron job looks like it's needed - and is running a PHP script - but why is it complaining about xdebug, and how do I fix it?

  • Did you check the apache user's crontab, as well as the stuff in /etc/cron.*? Dec 11 '11 at 13:26
  • The cron job is in /etc/cron.d/php5. I'm pretty sure the problem isn't that the cronjob is running (it looks like it's a bit of useful maintenance), but that it's trying to load xdebug twice - that's the bit I need to fix
    – hippyjim
    Dec 11 '11 at 20:19

Check your php.ini settings; if you have a separate xdebug.ini file under /etc/php5/conf.d containing a zend_extension=*.xdebug.so line, it's possible that it already exists in the main cli/php.ini file too, so when it tries to load the second config file it'll produe the already loaded error message.

  • Yup, that was it. as well as in the /etc/php5/conf.d/xdebug.ini, it was also in the /etc/php5/cli/php.ini - removing the line from there fixed the problem.
    – hippyjim
    Dec 16 '11 at 14:24
  • It's also worth looking to see what modules/extensions are compiled in with php -m. See somacon.com/p520.php Apr 29 '14 at 5:05

Looks like you have more then just a job loading xdebug.

Look for more lines inside your /etc/cron.d/ folder files and inside /etc/php5/conf.d trying to load xdebug.so.

  • 1
    Thanks for the thought. Unfortunately it's not really much help. Sure it's true that xdebug.so is loaded in /etc/php5/conf.d/xdebug.ini - but it needs to be in order for xdebug to run. it's just this one job that's complaining about loading it twice - all php commandline scripts, and webscripts are fine
    – hippyjim
    Dec 14 '11 at 12:42
  • 1
    Ehm, this answer is almost as good as the other one. +1. May 22 '13 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.