PHP Warning: Module already loaded in Unknown on line 0

前端 未结 15 1214
抹茶落季
抹茶落季 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:34

    Comment out these two lines in php.ini

    ;extension=imagick.so
    ;extension="ixed.5.6.lin"
    

    it should fix the issue.

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

    I had the same issue after upgrading from Fedora Server 24 (PHP 5) to 25 (PHP 7). After investigation, I found that /etc/php.d/ had two different .ini files loading extension=geoip.so.

    Previous version of distros had this file named 50-geoip.ini but the recent was changed to 40-geoip.ini, and I suspect that in the version-upgrade process the old hasn't been removed, while the new one has been created.

    That was the actual case of the issue. After removing stray 50-geoip.ini from /etc/php.d/ and restarting httpd it just worked flawlessly.

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

    I figured this out by printing the PHP configuration and searching by xml.ini. Notice in the following output how xml is loaded twice (first as 20-xml.ini and then as xml.ini):

    $ php -i | grep xml
    /etc/php.d/20-simplexml.ini,
    /etc/php.d/20-xml.ini,
    /etc/php.d/20-xmlwriter.ini,
    /etc/php.d/30-xmlreader.ini,
    /etc/php.d/xml.ini
    xmlrpc_error_number => 0 => 0
    xmlrpc_errors => Off => Off
    libxml Version => 2.9.1
    libxml
    mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text /|application/xhtml\+xml)
    xml
    libxml2 Version => 2.9.1
    xmlreader
    xmlwriter
    libxslt compiled against libxml Version => 2.9.1
    
    0 讨论(0)
提交回复
热议问题