PHP Warning: Module 'soap' already loaded in Unknown on line 0
Solution 1
looks like you are loading the 'soap' module multiple times
instead of rep extension /usr/local/lib/php.ini
, you should use grep extension /usr/local/lib/php.ini
to search the modules loaded
If 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:
<?php phpinfo(); ?> in your browser, search for "Loaded Configuration File" and "Scan this dir for additional .ini files"
-
If you got PHP Warning when running PHP on the shell, run this on shell:
php -r "phpinfo();" | awk '/^Loaded|^Scan/ {print $NF}'
depends on your installation, besides php.ini you may have ini files in php.d
for my redhat server:
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
Solution 2
Comment the extension=soap in one of the files:
e.g = in your Xampp (php.ini)
;extension=soap
Solution 3
Go to: /etc/php/7.0/cli/conf.d/
Then:
ls | grep soap
Two files will be listed:
- 20-soap.ini
- 40-soap.ini
Comment the extension=soap.so in one of the files:
;extension=soap.so
Done.
If you're using Docker, comment the follow line in your /workspace/Dockerfle:
echo "extension=soap.so" >> /etc/php/7.0/cli/conf.d/40-soap.ini
Related videos on Youtube
FabricioG
Updated on September 15, 2022Comments
-
FabricioG over 1 year
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 [root@w8ld-gg7p ~]# rep extension /usr/local/lib/php.ini -bash: rep: command not found [root@w8ld-gg7p ~]#
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!
-
FabricioG over 10 yearsHi! Thanks for your response. So what I did was I went to the command line in my terminal and I typed in: grep extension /usr/local/lib/php.ini and this is what I got: grep: /usr/local/lib/php.ini: No such file or directory
-
ray over 10 years@user2690257 in your question, you were searching /usr/local/lib/php.ini, thought that was your php.ini location. I have updated my reply, please try it to get php.ini and any other additional ini loaded. thanks.
-
saber tabatabaee yazdi almost 5 yearsi comment that line and worked for me thanks. but if we have more project how can we manage if we want to develop more than 1 project simultaneously. how can we mange these conflicts