This question has been asked before but none of the solutions work for me. I was mainly following this one - enable SOAP on PHP to no avail. I have a php script which is giving the following error:
Error message: Fatal error: Class 'SoapClient' not found in /var/www/pathtofile/file.php on line 90
I guess need to install soap on a Plesk 11.0.9 and CentOS 5.6 (Final). This is what I have by default in the php.ini file:
[soap]
; Enables or disables WSDL caching feature.
soap.wsdl_cache_enabled=1
; Sets the directory name where SOAP extension will put cache files.
soap.wsdl_cache_dir="/tmp"
; (time to live) Sets the number of second while cached file will be used
; instead of original one.
soap.wsdl_cache_ttl=86400
and php -i | grep soap gives me:
'--enable-soap=shared'
if I run yum install php-soap I get the following:
Resolving Dependencies
--> Running transaction check
---> Package php-soap.i386 0:5.1.6-32.el5 set to be updated
--> Processing Dependency: php-common = 5.1.6-32.el5 for package: php-soap
--> Running transaction check
---> Package php-common.i386 0:5.1.6-32.el5 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-13.el5_8.i386 from installed has depsolving problems
--> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
if I run yum install php53-soap I get the following:
Resolving Dependencies
--> Running transaction check
---> Package php53-soap.i386 0:5.3.3-5.el5 set to be updated
--> Processing Dependency: php53-common = 5.3.3-5.el5 for package: php53-soap
--> Finished Dependency Resolution
php53-soap-5.3.3-5.el5.i386 from base has depsolving problems
--> Missing Dependency: php53-common = 5.3.3-5.el5 is needed by package php53-soap-5.3.3-5.el5.i386 (base)
Error: Missing Dependency: php53-common = 5.3.3-5.el5 is needed by package php53-soap- 5.3.3-5.el5.i386 (base)
If I run yum list available | grep soap I get:
php-soap.i386 5.1.6-32.el5 base
php53-soap.i386 5.3.3-5.el5 base
if I run yum list available | grep soap I get the following:
php53-common-5.3.3-13.el5_8
php53-mysql-5.3.3-13.el5_8
php53-xml-5.3.3-13.el5_8
psa-php53-configurator-1.6.2-cos5.build110120608.16
php5-ioncube-loader-4.0.14-12042719
php53-5.3.3-13.el5_8
php53-mbstring-5.3.3-13.el5_8
php-pear-1.4.9-8.el5
psa11-php-fakepackage-11.0.9-cos5.build110120608.16
php53-pdo-5.3.3-13.el5_8
php53-imap-5.3.3-13.el5_8
php53-sqlite2-5.3.2-11070811
php53-cli-5.3.3-13.el5_8
php53-gd-5.3.3-13.el5_8
php53-devel-5.3.3-13.el5_8
If I run yum list | grep php I get:
php-pear.noarch 1:1.4.9-8.el5 installed
php5-ioncube-loader.i386 4.0.14-12042719 installed
php53.i386 5.3.3-13.el5_8 installed
php53-cli.i386 5.3.3-13.el5_8 installed
php53-common.i386 5.3.3-13.el5_8 installed
php53-devel.i386 5.3.3-13.el5_8 installed
php53-gd.i386 5.3.3-13.el5_8 installed
php53-imap.i386 5.3.3-13.el5_8 installed
php53-mbstring.i386 5.3.3-13.el5_8 installed
php53-mysql.i386 5.3.3-13.el5_8 installed
php53-pdo.i386 5.3.3-13.el5_8 installed
php53-sqlite2.i386 5.3.2-11070811 installed
php53-xml.i386 5.3.3-13.el5_8 installed
psa-php53-configurator.i386 1.6.2-cos5.build110120608.16 installed
psa11-php-fakepackage.i386 11.0.9-cos5.build110120608.16 installed
graphviz-php.i386 2.12-8.el5.centos extras
php.i386 5.1.6-32.el5 base
php-bcmath.i386 5.1.6-32.el5 base
php-cli.i386 5.1.6-32.el5 base
php-common.i386 5.1.6-32.el5 base
php-dba.i386 5.1.6-32.el5 base
php-dbase.i386 5.1.6-15.el5.centos.1 extras
php-devel.i386 5.1.6-32.el5 base
php-gd.i386 5.1.6-32.el5 base
php-imap.i386 5.1.6-32.el5 base
php-ldap.i386 5.1.6-32.el5 base
php-mbstring.i386 5.1.6-32.el5 base
php-mcrypt.i386 5.1.6-15.el5.centos.1 extras
php-mhash.i386 5.1.6-15.el5.centos.1 extras
php-mssql.i386 5.1.6-15.el5.centos.1 extras
php-mysql.i386 5.1.6-32.el5 base
php-ncurses.i386 5.1.6-32.el5 base
php-odbc.i386 5.1.6-32.el5 base
php-pdo.i386 5.1.6-32.el5 base
php-pear-Auth-SASL.noarch 1.0.2-4.el5.centos extras
php-pear-DB.noarch 1.7.13-1.el5.centos extras
php-pear-Date.noarch 1.4.7-2.el5.centos extras
php-pear-File.noarch 1.2.2-1.el5.centos extras
php-pear-HTTP-Request.noarch 1.4.2-1.el5.centos extras
php-pear-Log.noarch 1.9.13-1.el5.centos extras
php-pear-MDB2.noarch 2.4.1-2.el5.centos extras
php-pear-MDB2-Driver-mysql.noarch 1.4.1-3.el5.centos extras
php-pear-Mail.noarch 1.1.14-1.el5.centos extras
php-pear-Mail-Mime.noarch 1.4.0-1.el5.centos extras
php-pear-Net-SMTP.noarch 1.2.10-1.el5.centos extras
php-pear-Net-Sieve.noarch 1.1.5-2.el5.centos extras
php-pear-Net-Socket.noarch 1.0.8-1.el5.centos extras
php-pear-Net-URL.noarch 1.0.15-1.el5.centos extras
php-pecl-Fileinfo.i386 1.0.4-3.el5.centos extras
php-pecl-memcache.i386 2.2.3-1.el5_2 extras
php-pgsql.i386 5.1.6-32.el5 base
php-readline.i386 5.1.6-15.el5.centos.1 extras
php-snmp.i386 5.1.6-32.el5 base
php-soap.i386 5.1.6-32.el5 base
php-tidy.i386 5.1.6-15.el5.centos.1 extras
php-xml.i386 5.1.6-32.el5 base
php-xmlrpc.i386 5.1.6-32.el5 base
php53-bcmath.i386 5.3.3-5.el5 base
php53-dba.i386 5.3.3-5.el5 base
php53-intl.i386 5.3.3-5.el5 base
php53-ldap.i386 5.3.3-5.el5 base
php53-odbc.i386 5.3.3-5.el5 base
php53-pgsql.i386 5.3.3-5.el5 base
php53-process.i386 5.3.3-5.el5 base
php53-pspell.i386 5.3.3-5.el5 base
php53-snmp.i386 5.3.3-5.el5 base
php53-soap.i386 5.3.3-5.el5 base
php53-xmlrpc.i386 5.3.3-5.el5 base
Any ideas on how to fix this problem with soap please?
The root problem is that, for some reason, the repos you're talking to have version 5.3.3-5.el5 of the SOAP extension, but you have a newer version of the rest of PHP, version 5.3.3-13.el5_8.
That makes little sense, as -13.el5_8 is the current version I see in the official CentOS repos for all PHP modules, including SOAP.
You probably want to sudo yum clean all
and make sure your repo list is up to date and using the correct sources. If not for the fact that you're running a control panel suite, I'd also recommend a plain old sudo yum update
, but I'm not sure if Plesk will enjoy that.
If it turns out that you're actually using Plesk-approved repos, you'll need to tell them to get their act in gear.