PHP Warning: Module already loaded in Unknown on line 0
Solution 1:
I think you have loaded Xdebug probably twice in php.ini
.
-
check the
php.ini
, that not have setxdebug.so
for the valuesextension=
andzend_extension=
. -
Check also
/etc/php5/apache2
and/etc/php5/cli/
. You should not load in eachphp.ini
in these directories the extensionxdebug.so
. Only one file,php.ini
should load it.Note: Inside the path is the string
/etc/php5
. The 5 is the version of PHP. So if you use another version, you always get a different path, likephp7
.
Solution 2:
I had the same issue on mac i.e. Warning: Module 'pdo_pgsql' already loaded in Unknown on line 0
.
Here's how I solved it.
- Locate the folder
conf.d
, mine was in the directory/usr/local/etc/php/7.0/conf.d
. - In this folder, there's a file called
ext-pdo_pgsql.ini
. - Type
sudo nano ext-pdo_pgsql.ini
to edit it. - There should be a line
extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so"
. Comment it out by adding semi-colon to the beginning of the line i.e.;extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so"
. - Save the file. (I usually run control + O, control + M).
- Exit the file (control + X).
Hope this helps someone.
Solution 3:
To fix this problem, you must edit your php.ini (or extensions.ini) file and comment-out the extensions that are already compiled-in. For example, after editing, your ini file may look like the lines below:
;extension=pcre.so
;extension=spl.so
Source: http://www.somacon.com/p520.php
Solution 4:
You should have a /etc/php2/conf.d directory (At least on Ubuntu I do) containing a bunch of .ini files which all get loaded when php runs. These files can contain duplicate settings that conflict with settings in php.ini
. In my PHP installation I notice a file conf.d/20-intl.ini
with an extension=intl.so
setting. I bet that's your conflict.