Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Did you check the apache user's crontab, as well as the stuff in /etc/cron.*? – Scott Severance 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
up vote 8 down vote accepted

Check your php.ini settings; if you have a separate xdebug.ini file under /etc/php5/conf.d containing a zend_extension=* 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.

share|improve this answer
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 – Mark Kasson 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

share|improve this answer
Thanks for the thought. Unfortunately it's not really much help. Sure it's true that 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
Ehm, this answer is almost as good as the other one. +1. – Prof. Falken May 22 '13 at 15:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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