How do I install soap extension?

前端 未结 9 478
故里飘歌
故里飘歌 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:27

    For Windows

    1. Find extension=php_soap.dll or extension=soap in php.ini and remove the commenting semicolon at the beginning of the line. Eventually check for soap.ini under the conf.d directory.

    2. Restart your server.

    For Linux

    Ubuntu:

    PHP7

    Apache

    sudo apt-get install php7.0-soap 
    sudo systemctl restart apache2
    

    PHP5

    sudo apt-get install php-soap
    sudo systemctl restart apache2
    

    OpenSuse:

    PHP7

    Apache

    sudo zypper in php7-soap
    sudo systemctl restart apache2
    

    Nginx

    sudo zypper in php7-soap
    sudo systemctl restart nginx
    
    0 讨论(0)
  • 2020-12-01 06:27

    In ubuntu to install php_soap on PHP7 use below commands. Reference

    sudo apt-get install php7.0-soap
    sudo systemctl restart apache2.service
    

    For older version of php use below command and restart apache.

    apt-get install php-soap
    
    0 讨论(0)
  • 2020-12-01 06:30

    find this line in php.ini :

    ;extension=soap
    

    then remove the semicolon ; and restart Apache server

    0 讨论(0)
  • 2020-12-01 06:33

    Dreamhost now includes SoapClient in their PHP 5.3 builds. You can switch your version of php in the domain setup section of the dreamhost control panel.

    0 讨论(0)
  • 2020-12-01 06:38

    I had the same problem, there was no extension=php_soap.dll in my php.ini But this was because I had copied the php.ini from a old and previous php version (not a good idea). I found the dll in the ext directory so I just could put it myself into the php.ini extension=php_soap.dll After Apache restart all worked with soap :)

    0 讨论(0)
  • 2020-12-01 06:39

    They dont support it as in in they wont help you or be responsible for you hosing anything, but you can install custom extensions. To do so you need to first set up a local install of php 5, during that process you can compile in extensions you need or you can add them dynamically to the php.ini after the fact.

    0 讨论(0)
提交回复
热议问题