在Plesk上启用SOAP

时间:2012-12-10 10:45:19

标签: php soap plesk

之前已经提出过这个问题,但没有一个解决方案适合我。我主要是关注这一个 - enable SOAP on PHP无济于事。我有一个PHP脚本,它给出以下错误:

Error message: Fatal error: Class 'SoapClient' not found in /var/www/pathtofile/file.php on line 90

我想需要在Plesk 11.0.9和CentOS 5.6(最终版)上安装soap。这是我在php.ini文件中默认拥有的内容:

[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

php -i | grep soap 给了我:

'--enable-soap=shared' 

如果我运行 yum install php-soap ,我会得到以下内容:

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

如果我运行 yum install php53-soap ,我会得到以下内容:

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)

如果我运行 yum list available | grep soap 我明白了:

php-soap.i386                            5.1.6-32.el5                     base
php53-soap.i386                          5.3.3-5.el5                      base

如果我运行 yum list available | grep soap 我得到以下内容:

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

如果我运行 yum list | grep php 我明白了:

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

有关如何用肥皂解决这个问题的任何想法吗?

1 个答案:

答案 0 :(得分:4)

根本问题是,由于某种原因,你正在谈论的repos有SOAP扩展的5.3.3- 5 .el5版本,但你有更新版本的其余版本PHP,版本5.3.3- 13 .el5_8。

这没有多大意义,因为-13.el5_8是我在官方CentOS存储库中看到的所有PHP模块的当前版本,包括SOAP。

您可能希望sudo yum clean all并确保您的回购列表是最新的并使用正确的来源。如果不是因为你正在运行一个控制面板套件,我也推荐一个普通的sudo yum update,但我不确定Plesk是否会喜欢它。

如果事实证明您实际上正在使用Plesk认可的回购,那么您需要告诉他们让他们采取行动。