Articles in this section

Error loading module while running PHP script in Plesk: PHP Warning: Module <module_name> already loaded in Unknown on line 0

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Error loading module while running PHP script:

    CONFIG_TEXT: PHP Warning: Module '<module_name>' already loaded in Unknown on line 0

Cause

A PHP Module is enabled several times in one of the php.ini files.

Resolution

  1. Connect to the server via SSH
  2. Check the .ini files of the PHP handler and find duplicates (replace <module_name> with the actual module name from the error):

    For the PHP version provided by the OS vendor:

    # grep -iR '<module_name>' /etc/php/

    For PHP X.X version shipped with Plesk, e.g. 8.2:

    # grep -iR '<module_name>' /opt/plesk/php/X.X/etc/

    For custom php.ini file for the domain:

    # grep -iR '<module_name>' /var/www/vhosts/system/example.com/conf/etc/

  3. Comment or remove the duplicated directive line using the text editor
Was this article helpful?

Comments

1 comment
Date Votes
  • Applicable to:
    Plesk for Linux

    Symptoms:
    Error loading module while running PHP script:
    PHP Warning: Module '<module_name>' already loaded in Unknown on line 0

    Cause:
    The PHP module is enabled multiple times in one or more php.ini files.

    Resolution:

    1. Connect to the server via SSH.
    2. Search for duplicates of the module directive (replace <module_name> with the actual module name from the error):
    • For the PHP version provided by the OS vendor:
      grep -iR '<module_name>' /etc/php/
    • For PHP version shipped with Plesk (e.g., 8.2):
      grep -iR '<module_name>' /opt/plesk/php/X.X/etc/
    • For custom php.ini files for the domain:
      grep -iR '<module_name>' /var/www/vhosts/system/example.com/conf/etc/mr flip

      3. Use a text editor to comment out or remove the duplicated directive lines.

    0

Please sign in to leave a comment.