Error loading module while running PHP script in Plesk: PHP Warning: Module

Started by Suhitha, Nov 03, 2025, 07:23 AM

Previous topic - Next topic

Suhitha

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


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

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/

Comment or remove the duplicated directive line using the text editor