How to Fix PHP Warning: Module already loaded in Unknown on line 0 on Ubuntu

I received email from cronjob saying that there was PHP module already loaded:

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

This warning happens when there is PHP extension loaded more than once. To fix this problem, check /etc/php5/apache2/php.ini file and the corresponding module configuration file in /etc/php5/conf.d/. For mysql module, I found it loaded 2 times in /etc/php5/apache2/php.ini and /etc/php5/conf.d/mysql.ini. Deactivate one module will settle the problem.

I also found that mysql.so extension is loaded 2 times on /etc/php5/cli/php.ini and /etc/php5/cli/conf.d/mysql.ini

I put ; (semi colon)ย  in front of the line in /etc/php5/conf.d/mysql.ini

mysql.ini

Keywords:

  • php warning: module mysql already loaded in unknown on line 0
  • php warning: module \mysql\ already loaded in unknown on line 0
  • php warning: module curl already loaded in unknown on line 0
  • PHP Warning: Module \curl\ already loaded in Unknown on line 0
  • Module mysql already loaded in Unknown on line 0
  • php warning: module apc already loaded in unknown on line 0
  • php warning module mysql already loaded in unknown on line 0
  • module curl already loaded in unknown on line 0
  • php warning: module \apc\ already loaded in unknown on line 0
  • php warning module \mysql\ already loaded in unknown on line 0
Comments
  1. Neto Reply
  2. Reza Maghsoudi Reply
  3. Reza Maghsoudi Reply
    • kumkum Reply
      • Reza Maghsoudi Reply
  4. Ed Reply
  5. giz Reply
    • kumkum Reply
  6. David Reply
  7. Shawn Reply
  8. SunilJ Reply
  9. wild Reply

Leave a Reply

Your email address will not be published. Required fields are marked *