We have VPS with CentOS I have installed soap with following command.
yum install php-soap
Then I went to php.ini to un-comment soap extension. It was not there so, I added my own following line.
extension=soap.so
Then i restart server with following command
service httpd restart
But SOAP is still not enabled. as i get Fatal error: Class 'SoapClient' If i try to install it again. I get following message.
Package php-soap-5.3.3-27.el6_5.x86_64 already installed and latest version
I tried to re-configure PHP with following command as well.
php-config '--disable-fileinfo' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pic' '--with-zlib' '--with-zlib-dir=/usr' '--enable-soap'
Any help?
I installed php-soap to CentOS Linux release 7.1.1503 (Core) using following way.
1) yum install php-soap
2) yum search php-soap
3) service httpd restart
To verify run following
4) php -m | grep -i soap
soap
On CentOS 7, the following works:
This will automatically create a soap.ini under /etc/php.d.
The extension itself for me lives in /usr/lib64/php/modules. You can confirm your extension directory by doing:
Once this has been installed, you can simply restart Apache using the new service manager like so:
Thanks to Matt Browne for the info about /etc/php.d.
After hours of searching I think my problem was that command
yum install php-soap
installs the latest version of soap for the latest php version of php.My php version was
7.027
, but latest version was7.2
so I had to search for the right soap version and finaly found it HERE!yum install rh-php70-php-soap
Now
php -m | grep -i soap
works:outputs:
soap
!do not forget to restart
httpd
service.yoohooo!
For my point of view, First thing is to install soap into Centos
Second, see if the soap package exist or not
third, thus you must see some result of soap package you installed, now type a command in your terminal in the root folder for searching the location of soap for specific path
fourth, you will see the exact path where its installed/located, simply copy the path and find the php.ini to add the extension path,
usually the path of php.ini file in centos 6 is in
fifth, add a line of code from below into php.ini file
and then save the file and exit.
sixth run apache restart command in Centos. I think there is two command that can restart your apache ( whichever is easier for you )
OR
Lastly, check phpinfo() output in browser, you should see SOAP section where SOAP CLIENT, SOAP SERVER etc are listed and shown Enabled.