PHP Warning: Module already loaded in Unknown on line 0

php warning: module 'json' already loaded in unknown on line 0
module pdo_oci already loaded in unknown on line 0
php warning: module 'mcrypt' already loaded in unknown on line 0
module 'mbstring' already loaded codeigniter
hp warning module mongodb already loaded in unknown on line 0
warning module bz2 already loaded in unknown on line 0
laravel php warning module pgsql already loaded in unknown on line 0
module zip already loaded in unknown 0

On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it's just annoying)

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

I ran

php --ini

and the output was

php --ini
PHP Warning:  Module 'intl' already loaded in Unknown on line 0

Warning: Module 'intl' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/5.5
Loaded Configuration File:         /usr/local/etc/php/5.5/php.ini
Scan for additional .ini files in: /usr/local/etc/php/5.5/conf.d
Additional .ini files parsed:      /usr/local/etc/php/5.5/conf.d/ext-apcu.ini,
/usr/local/etc/php/5.5/conf.d/ext-igbinary.ini,
/usr/local/etc/php/5.5/conf.d/ext-intl.ini,
/usr/local/etc/php/5.5/conf.d/ext-memcached.ini,
/usr/local/etc/php/5.5/conf.d/ext-mongo.ini,
/usr/local/etc/php/5.5/conf.d/ext-uuid.ini,
/usr/local/etc/php/5.5/conf.d/ext-xdebug.ini

Checked in the php.ini file and the only place intl is loaded is at the top and it's commented out. The other files contents look something like:

extension="/usr/local/Cellar/php55/5.5.23/lib/php/extensions/no-debug-non-zts-20121212/intl.so"

where the contents after the last slash is the extension.

I'm not sure where else to look.

Any help is appreciated

I think you have loaded Xdebug probably twice in php.ini.

  1. check the php.ini, that you not have xdebug.so for the values extension= and zend_extension=.

  2. Check also /etc/php5/apache2 and /etc/php5/cli/. You should not load in each php.ini in this directories the extension xdebug.so. Only one file php.ini should load it.

PHP Warning: Module 'modulename' already loaded in Unknown on line 0. This page describes how to resolve the following PHP warning:  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/.

Context and Logs. Cannot load Zend OPcache - it was already loaded PHP Warning: Module 'imagick' already loaded in Unknown on line 0 PHP  So I checked my spam folder today and had 122 messages send through the server stating: PHP Warning: Module 'imagick' already loaded in Unknown on line 0 Non stop it keeps sending me this. Googled it and still have no clue on how to fix it as I need a step by step answer.

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.

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/. Description. Due to the latest upgrade with brew upgrade command, I started to get weird PHP warnings - see logs below. Context and Logs Cannot load Zend OPcache - it was already loaded PHP Warning: Module 'imagick' already loaded in Unknown on line 0 PHP Warning: Module 'intl' already loaded in Unknown on line 0 PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0 PHP Warning

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

I am getting this error in my error_log files, for all of my sites on my VPS; repeatable on every page load: PHP Warning: Module 'imagick'  I removed 'extension = phalcon.so' , and added json.so and restart php7.0-fpm, but still get a warning message: PHP Warning: Module 'phalcon' already loaded in Unknown on line 0. and tried to add 'extension = phalcon.so' after 'extension = json.so', but I still get the same warning message – arjilm Jan 29 '17 at 9:48

In my case I had uncoment the ;extension=php_curl.so in php.ini, but Ubuntu was already calling this extension somewhere else.

To find this "somewhere else", on php.ini will informe. On my case: /etc/php/7.1/apache2/conf.d/20-curl.ini was the path.

So now we edit this file (terminal):

sudo nano /etc/php/7.1/apache2/conf.d/20-curl.ini

Comment the ;extension=php_curl.so

Save file and restart apache:

sudo systemctl restart apache2

PHP Warning: Module 'mbstring' already loaded in Unknown on line 0. However, I got this even before I copied php.ini-production to php.ini,  Bug #50714: PHP Warning: Module 'oci8' already loaded in Unknown on line 0: Submitted: 2010-01-10 13:50 UTC: Modified: 2010-01-10 14:42 UTC: From: peisanangela at gmail dot com

Question : I got this error Log in CMS (Joomla and WordPress) : PHP Warning: Module 'PDO' already loaded in Unknown on line 0. Solution: First locate php.ini There are two "php_intl.dll" files inside php.ini file on 872 and 968 number lines. if php warning module 'intl' already loaded in unknown on line 0 this message is focused on your CLI. Then you should have to remove the semiclone prefixes on line 872.

I'm getting an error whenever I update. It's: PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0 Any idea how to solve this? PHP Warning: Module 'mbstring' already loaded in Unknown on line 0 However, I got this even before I copied php.ini-production to php.ini , and inside of php.ini there does not exist any string which refers to mbstring.ini or any sort of ini file (only Windows DLLs).

perhaps the Ubuntu install directions need to be amended.. the errors. PHP Warning: Module 'apc' already loaded in Unknown on line 0. PHP 

Comments
  • Check /usr/local/etc/php/5.5/conf.d/ext-intl.ini and /usr/local/etc/php/5.5/php.ini Most likely it's there more than once.
  • Try to enable the intl extension at the php.ini file and remove (with back up) the file ext-intl.ini
  • I solved this problem by checking each of the .ini file under the conf.d directory, and found there's two same line extension=imagick.so in the imagick.ini, and I removed one of them it works fine
  • Hey , I can't find xdebug in my cli/php.ini and still its showing me these errors. PHP Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: /usr/lib/php/20170718/gd2 (/usr/lib/php/20170718/gd2: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/gd2.so (/usr/lib/php/20170718/gd2.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
  • This worked for me for 'mongodb' issue in ubuntu 18.04. I found similar file for mongodb in etc/php/7.2/apache2/conf.d