How do I install soap extension?

前端 未结 9 479
故里飘歌
故里飘歌 2020-12-01 05:51

How do I install Soap?

I got this error:

Fatal error: Class \'SoapClient\' not found in /home/user/mysite.com/path/to/file.php on line 16

相关标签:
9条回答
  • 2020-12-01 06:40

    How To for Linux Ubuntu...

    sudo apt-get install php7.1-soap 
    

    Check if file php_soap.ao exists on /usr/lib/php/20160303/

    ls /usr/lib/php/20160303/ | grep -i soap
    soap.so
    php_soap.so
    
    sudo vi /etc/php/7.1/cli/php.ini
    

    Change the line :

    ;extension=php_soap.dll

    to

    extension=php_soap.so

    sudo systemctl restart apache2
    

    CHecking...

    php -m | more
    
    0 讨论(0)
  • 2020-12-01 06:40

    Please follow the below steps :

     1) Locate php.ini in your apache bin folder, I.e Apache/bin/php.ini
     2) Remove the ; from the beginning of extension=php_soap.dll
     3) Restart your Apache server (by using : 
        # /etc/init.d/apache2 restart OR 
        $ sudo /etc/init.d/apache2 restart OR 
        $ sudo service apache2 restart)
     4) Look up your phpinfo();
    
     you may check here as well,if this does not solve your issue:  
     https://www.php.net/manual/en/soap.requirements.php
    
    0 讨论(0)
  • 2020-12-01 06:43

    In Ubuntu with php7.3:

    sudo apt install php7.3-soap 
    sudo service apache2 restart
    
    0 讨论(0)
提交回复
热议问题