Magento Uncaught SoapFault异常:[0]无法在/ opt/local/apache2/htdocs/code /中加载服务器上的Soap扩展

num*_*l25 1 php apache soap soap-client magento

我现在迷路了.我试图使用Soap客户端,我得到以下错误

Uncaught SoapFault exception: [0] Unable to load Soap extension on the server in /opt/local/apache2/htdocs/code/import.php
Run Code Online (Sandbox Code Playgroud)

在import.php里面

import.php

$client = new SoapClient('http://mymagentowebsite.com/api/soap/?wsdl');
$session = $client->login('api_master', 'api123');
Run Code Online (Sandbox Code Playgroud)

当我到达我的phpinfo时,我能够看到我的肥皂客户端启用了 在此输入图像描述

我正在使用Macports,我也安装了soap端口扩展

以下是我在php.ini中找到的内容

extension=php_soap.dll
[soap]
; Enables or disables WSDL caching feature.
; http://php.net/soap.wsdl-cache-enabled
soap.wsdl_cache_enabled=1

; Sets the directory name where SOAP extension will put cache files.
; http://php.net/soap.wsdl-cache-dir
soap.wsdl_cache_dir="/tmp"

; (time to live) Sets the number of second while cached file will be used
; instead of original one.
; http://php.net/soap.wsdl-cache-ttl
soap.wsdl_cache_ttl=86400

; Sets the size of the cache limit. (Max. number of WSDL files to cache)
soap.wsdl_cache_limit = 5
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么 ?

num*_*l25 5

我已经明白了.我的本地机器安装了SOAP CLIENT和SERVER扩展,但我调用的服务器却没有.我不得不去远程服务器并安装soap扩展.我从以下获得了我的来源.

我很困惑,因为我认为错误是指我的本地机器,但它指的是我的远程机器.

PHP SOAP致命错误消息