bash - PHP Warning: Module 'soap' already loaded in Unknown on line 0
Hi, I have a problem with this error: PHP Warning: Module 'soap' already loaded in Unknown on line 0
I am running vps on media temple. I got some instructions from their knowledge base and I followed them exactly as described. However to see if SOAP properly installed i went to the command line and ran "pear list" and this is what I get.
PHP Warning: Module 'soap' already loaded in Unknown on line 0
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.11 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.1 stable
[[email protected] ~]# rep extension /usr/local/lib/php.ini
-bash: rep: command not found
[[email protected] ~]#
Can anyone tell me what I'm doing wrong? First off it doesn't load SOAP in the installed packages list. Second I get that SOAP loaded in unkown error.
I'm a newbie so any help would be greatly appreciated! Thank you!
Answer
Solution:
Comment the extension=soap in one of the files:
e.g = in your Xampp (php.ini)
Answer
Solution:
looks like you are loading the 'soap' module multiple times instead of
rep extension /usr/local/lib/php.ini
, you should usegrep extension /usr/local/lib/php.ini
to search the modules loadedIf your ini is in different location, you need to find where is it.
If you got PHP Warning from webpage, you can create a file with this as the content:
If you got PHP Warning when running PHP on the shell, run this on shell:
depends on your installation, besides php.ini you may have ini files in php.d
for my redhat server:
Answer
Solution:
Go to: /etc/php/7.0/cli/conf.d/
Then:
Two files will be listed:
Comment the extension=soap.so in one of the files:
Done.
If you're using Docker, comment the follow line in your /workspace/Dockerfle:
Answer
Solution:
I had a similar problem for mbstring module. As we have two php.ini file one in apache2 and the other in cli You should uncomment (and hence load) in only one php.ini file the line ;extension=php_soap.dll(so) This should suppress the warning.