PHP Warning: Module already loaded in Unknown on line 0

前端 未结 15 1156
抹茶落季
抹茶落季 2020-11-27 16:38

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 War         


        
相关标签:
15条回答
  • 2020-11-27 17:13

    I deleted the 20-mongo.ini file in /etc/php5/cli/conf.d and this solved the problem.

    0 讨论(0)
  • 2020-11-27 17:16

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

    1. check the php.ini, that not have set 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 these directories the extension xdebug.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, like php7.

    0 讨论(0)
  • 2020-11-27 17:19

    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 expect this will done.....

    0 讨论(0)
  • 2020-11-27 17:25

    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
    
    0 讨论(0)
  • 2020-11-27 17:26

    For shared hosting, in cPanel I unchecked the Module in question under "Select PHP Version" > "Extensions" and the error disappeared for PHP 7.4.

    0 讨论(0)
  • 2020-11-27 17:28

    Just for the record as it might help others who are on shared hosting (cPanel).

    I had error on shared hosting php7.2: Module 'imagick' already loaded in Unknown on line 0

    In the beginning hosting provider said it was my bad configuration (running Yii2.16). But after I showed them, that all Internet related this issue to server configuration -they started to listen to me. After I proved, that there was no error on php7.1 they started to search for the error.

    As they told to me - the error was due to configuration in PERL modules or PEAR package, but they did not told me the real issue.

    So, if you are on shared hosting - talk to you provider and experiment with PHP versions (if you can change them).

    0 讨论(0)
提交回复
热议问题