PHP SOAP Extension

PHP webservice教程,soap wsdl密码验证,webservice高级应用 PHP webservice教程,soap wsdl密码验证,webservice高级应用; 好用一定要给好评哦 立即下载
PHP SOAP ExtensionNotify me when a new spotlight appears Send this article to a friend View printable format Next
By Dmitry Stogov

March 16, 2004

Intended Audience
Introduction
A First SOAP Client
•  Example 1 (client1.php)
•  Example 2 (client2.php)
•  A First SOAP Server
•  Example 3 (stockquote.wsdl)
•  Example 4 (server1. php)
•  Example 5 (client3.php)
•  Example 6 (server2.php)
•  Example 7 (client4.php)
What's inside?
•  Example 8 (client5.php)
Other Implementations of SOAP for PHP
Summary
References
About the Author

Intended Audience

This article describes the new SOAP extension for PHP. It is intended for PHP developers who want to write their own Web Services servers, or use SOAP to access existing ones. It assumes some familiarity with Web Services, SOAP, and WSDL (Web Services Description Language).

Introduction

SOAP (Simple Object Access Protocol) is a lightweight XML-based protocol for exchanging structured information between distributed applications over native web protocols, such as HTTP. SOAP specifies the formats that XML messages should use, the way in which they should be processed, a set of encoding rules for standard and application-defined data types, and a convention for representing remote procedure calls and responses.

Web Services is a modern and very popular technology. The list of protocols and technologies related to Web Services grows every day, but SOAP is probably the most important. It is rapidly becoming the standard protocol for accessing Web Services. It uses XML messages to exchange information across endpoints, and provides several advantages over other binary protocols. RPC (Remote Procedure Calls) support was originally a minor element in the design of SOAP, but this feature is one of the most useful it has today.

PHP 5's SOAP extension is the first attempt to implement the SOAP protocol for PHP in C. It has some advantages over the existing implementations written in PHP itself, the main one being speed. The extension is currently marked as experimental, but should gradually become more stable and reliable as time progresses.

The SOAP extension implements a large subset of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications. The key goal is to use the RPC feature of the SOAP protocol. WSDL is used where possible in order to make the implementation of Web Services more straightforward.

A First SOAP Client

To demonstrate how to make a simple SOAP Client, we'll take the XMethods demo service, “Delayed Stock Quote”, as our target. Before we start to write any PHP code, we'll need to gather some information about this particular service:

  • The method name
  • The endpoint URL where the service is running
  • The SOAPAction header value for the method
  • The namespace URI for the method
  • Input and output parameter names and types
Happily, all this information is available on the XMethods web site at http://www.xmethods.com/ in the form of the service's RPC profile:

Method NamegetQuote
Endpoint URLhttp://64.124.140.30:9090/soap
SOAPActionurn:xmethods-delayed-quotes#getQuote
Method Namespace URIurn:xmethods-delayed-quotes
Input ParametersSymbol
String
Output ParametersResult
float

Example 1 (client1.php)

<?php

$client
= new SoapClient(NULL,
        array(
        
"location" => "http://64.124.140.30:9090/soap",
        
"uri"      => "urn:xmethods-delayed-quotes",
        
"style"    => SOAP_RPC,
        
"use"      => SOAP_ENCODED
           
));

print(
$client->__call(
        
/* SOAP Method Name */
        
"getQuote",
        
/* Parameters */
        
array(
            new
SoapParam(
                
/* Parameter Value */
                
"ibm",
                
/* Parameter Name */
                
"symbol"
        
)),
        
/* Options */
        
array(
            
/* SOAP Method Namespace */
            
"uri" => "urn:xmethods-delayed-quotes",
            
/* SOAPAction HTTP Header for SOAP Method */
            
"soapaction" => "urn:xmethods-delayed-quotes#getQuote"
        
)). "/n");
?>

As you can see, this simple task required a lot of work

Fortunately, Web Services can describe themselves to the client using WSDL, and generally they achieve this successfully. The location of the WSDL document for the XMethods “Delayed Stock Quote” service is given on the information page for that service at xmethods.com:

http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl

Here is the same PHP SOAP client, rewritten using that WSDL document. Now we don't need to specify the endpoint URI, namespace, SOAPAction header, encoding style and parameter types. All the information comes from the WSDL file.

Example 2 (client2.php)

<?php
$client
= new
    
SoapClient(
        
"http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl"
    
);

print(
$client->getQuote("ibm"));
?>

That's a little easier, isn't it?

What are the problems with WSDL? The only argument against using it is that the client has to load the relevant WSDL document from the server before the RPC can be made, and this can take a significant amount of time in a Web environment. In order to speed things up, PHP's ext/soap uses a WSDL caching feature that can be controlled through setting the soap.wsdl_cache_enabled, soap.wsdl_cache_dir and soap.wsdl_cache_ttl configuration directives, either in your php.ini or by using ini_set()(see Example 4 ). By default, WSDL caching is turned on and caches WSDL files for one day.

Here is the SOAP section for php.ini with default values. You can paste it into your php.ini.


[soap]

soap.wsdl_cache_enabled = "1"
; enables or disables WSDL caching feature

soap.wsdl_cache_dir = "/tmp"
; sets the directory name where SOAP extension will put cache files

soap.wsdl_cache_ttl = "86400"
; (time to live) sets the number of second while cached file will be used
; instead of original one

A First SOAP Server

Let's try to write our own SOAP Web service that will do the same as the XMethods “Delayed Stock Quote” service.

The first task is to create a WSDL document describing our service in a format that client requests will understand. This requires minor modifications to the original document taken from the Xmethods site, so we'll start by taking a close look at that file.

The message section defines two messages. The first is getQuoteRequest, which is a request to relay the getQuote message and takes one string parameter called symbol. The other is getQuoteResponse, which is a response to the getQuote message, containing one float value, named Result.

The portType section defines one operation, getQuote, which describes which of the messages listed in the message section will be used to transmit the request and response.

The binding section defines how the messages must be transmitted and encoded. Here it tells us that we will be sending an RPC request using SOAP encoding across HTTP. It also specifies namespace and value of the SOAPAction header for the getQuote method.

Lastly, the service section defines the endpoint URL where the service is running.

Example 3 (stockquote.wsdl)

<?xml version ='1.0' encoding ='UTF-8' ?>
<definitions name='StockQuote'
  targetNamespace='http://example.org/StockQuote'
  xmlns:tns=' http://example.org/StockQuote '
  xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
  xmlns:xsd='http://www.w3.org/2001/XMLSchema'
  xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
  xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
  xmlns='http://schemas.xmlsoap.org/wsdl/'>

<message name='getQuoteRequest'>
  <part name='symbol' type='xsd:string'/>
</message>
<message name='getQuoteResponse'>
  <part name='Result' type='xsd:float'/>
</message>

<portType name='StockQuotePortType'>
  <operation name='getQuote'>
    <input message='tns:getQuoteRequest'/>
    <output message='tns:getQuoteResponse'/>
  </operation>
</portType>

<binding name='StockQuoteBinding' type='tns:StockQuotePortType'>
  <soap:binding style='rpc'
    transport='http://schemas.xmlsoap.org/soap/http'/>
  <operation name='getQuote'>
    <soap:operation soapAction='urn:xmethods-delayed-quotes#getQuote'/>
    <input>
      <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
        encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
    </input>
    <output>
      <soap:body use='encoded' namespace='urn:xmethods-delayed-quotes'
        encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
    </output>
  </operation>
</binding>

<service name='StockQuoteService'>
  <port name='StockQuotePort' binding='StockQuoteBinding'>
    <soap:address location='http://[insert real path here]/server1.php'/>
  </port>
</service>
</definitions>

Note: The WSDL caching feature is on by default. During the development of your WSDL file it should be turned off.

Now it's time to create our server.

First, we'll implement the getQuote() function, which will be accessed as a service function by incoming request messages from the web. Next, we'll create a SoapServer object and connect it with the service function using SoapServer::addFunction() method. As you will see, the SoapServer() constructor has only one parameter: the path of the WSDL document that describes the service.

Example 4 (server1. php)

<?php
$quotes
= array(
  
"ibm" => 98.42
);  

function
getQuote($symbol) {
  global
$quotes;
  return
$quotes[$symbol];
}

ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("stockquote.wsdl");
$server->addFunction("getQuote");
$server->handle();
?>

The SoapServer can work without a WSDL document in much the same way that the SoapClient can, but there are no obvious benefits to be had from setting it up in this way. Were you to do so, you should ensure that the return values are special objects of the SoapParam and SoapVar classes (as in the first example).

Here is a client for accessing our own SOAP server. Nothing has changed from the previous example except the WSDL location. It assumes that “stockquote.wsdl” is in the same directory as our SOAP server.

Example 5 (client3.php)

<?php
  $client
= new SoapClient("stockquote.wsdl");
  print(
$client->getQuote("ibm"));
?>

What are the problem areas with our server and client?

To start with, they don't handle errors. What happens when the server doesn't recognize the requested symbol? The SOAP protocol specifies a special format of messages for reporting errors – SoapFault. To generate such messages the server should throw an exception using the SoapFault object. The first parameter to the SoapFault() constructor is a fault code string, and the second is a fault description string. The client should be written in such a way as to catch SoapFault exceptions.

Secondly, it would be better to encapsulate Web Service functionality in a PHP class. In this case we wouldn't need to use global variables and add each SOAP method to the server individually; we could add an entire class, and all its methods would be accessible through SOAP.

Save stockquote.wsdl as stockquote2.wsdl, and alter the soap:address on line 43 to point to server2.php. A modified version of our SOAP server and client follows:

Example 6 (server2.php)

<?php
class QuoteService {
  
private $quotes = array("ibm" => 98.42);  

  function
getQuote($symbol) {
    if (isset(
$this->quotes[$symbol])) {
      return
$this->quotes[$symbol];
    } else {
      
throw new SoapFault("Server","Unknown Symbol '$symbol'.");
    }
  }
}

$server = new SoapServer("stockquote2.wsdl");
$server->setClass("QuoteService");
$server->handle();
?>

As you can see, I have used the SoapServer::setClass() method to connect the SoapServer object with the QuoteService class.

Example 7 (client4.php)

<?php
  $client
= new SoapClient("stockquote2.wsdl");
  
try {
    echo
"<pre>/n";
    print(
$client->getQuote("ibm"));
    echo
"/n";
    print(
$client->getQuote("microsoft"));  
    echo
"/n</pre>/n";
  }
catch (SoapFault $exception) {
    echo
$exception;      
  }
?>

What's inside?

Are you curious about the SOAP message format, or hoping to debug a SOAP client of your own? If so, this section is for you.

The SoapClient() constructor accepts an associative array as its second parameter, as you already saw in the first example. Various options can be passed through this associative array. Here are just two:

  • trace – allows the client to store SOAP requests and responses (turned off by default)
  • exceptions – allows the client to control the exception mechanism (turned on by default)
Take a look at the following SOAP client example. It is derived from example 5, and shows precisely what is transmitted between the client and the server. In order to retrieve this information we use the SoapClient methods __getLastRequest() and __getLastResponse().

Example 8 (client5.php)

<?php
  $client
= new SoapClient("stockquote.wsdl",array(
    
"trace"      => 1,
    
"exceptions" => 0));
  
$client->getQuote("ibm");
  print
"<pre>/n";
  print
"Request :/n".htmlspecialchars($client->__getLastRequest()) ."/n";
  print
"Response:/n".htmlspecialchars($client->__getLastResponse())."/n";
  print
"</pre>";
?>

Here is the output of the script. It is modified a little, to make it more easily understood.

Request :
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="urn:xmethods-delayed-quotes"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <ns1:getQuote>
    <symbol xsi:type="xsd:string">ibm</symbol>
  </ns1:getQuote>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns1="urn:xmethods-delayed-quotes"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
  <ns1:getQuoteResponse>
    <Result xsi:type="xsd:float">98.42</Result>
  </ns1:getQuoteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Other Implementations of SOAP for PHP

All the above are written in PHP, rather than in C.

Summary

In this article I have described only the basic functionality of the SOAP extension for PHP. In reality it can do significantly more, but it isn't possible to demonstrate all its features in a short article. The main ones are:

  • support for complex types (arrays, objects)
  • support for SOAP headers
  • dynamic support for both SOAP 1.1 and SOAP 1.2
Perhaps these will be starting points for future articles.

The SOAP extension is fully documented at http://www.php.net/manual/en/ref.soap.php.

The extension is still in the early development phase, so your feedback will help to make it more stable, reliable, usable and fast. Please report any problems you find at http://bugs.php.net/.

References

“Simple Object Access Protocol (SOAP) 1.1” (http://www.w3.org/TR/2000/NOTE-SOAP-20000508/)

“SOAP 1.2 Part 0: Primer” (http://www.w3.org/TR/2003/REC-soap12-part0-20030624/)

“SOAP 1.2 Part 1: Messaging Framework" (http://www.w3.org/TR/2003/REC-soap12-part1-20030624/)

"SOAP 1.2 Part 2: Adjuncts" (http://www.w3.org/TR/2003/REC-soap12-part2-20030624)

“Web Services Description Language (WSDL) 1.1” (http://www.w3.org/TR/2001/NOTE-wsdl-20010315)

"XML Schema Part 1: Structures" (http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/)

"XML Schema Part 2: Datatypes" (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/)

About the Author

Dmitry Stogov is one of the authors of PHP's SOAP extension. He has also written the PECL/perl extension and Turck MMCache. He currently resides in St.Petersburg, Russia with his wife and one child. Please feel free to post any comments or questions below, or send them to dmitry@zend.com.

半导体EAP系统入门指南:从零开始理解设备自动化程序(附实战案例) 本文深入浅出地介绍了半导体制造中EAP(设备自动化程序)系统的核心作用与工作原理。EAP作为连接MES与生产设备的桥梁,负责指令翻译、数据采集与实时控制,是实现晶圆厂全自动化的关键。文章通过对比手动与自动模式,阐述了EAP在提升效率、保障良率方面的价值,并提供了一个实战案例,帮助读者从零构建对半导体CIM体系中这一关键组件的理解。 阅读详情

相关推荐

Hierarchical-Localization 环境配置与依赖管理全攻略

本文提供了Hierarchical-Localization(hloc)视觉定位工具箱从零开始的环境配置与依赖管理全攻略。针对Windows、Ubuntu和macOS三大操作系统,详细解析了Python版本选择、PyTorch与CUDA版本匹配、pycolmap版本锁定等核心依赖的安装步骤,并汇总了权重文件格式、NumPy版本、路径配置等常见问题的排查与解决方案,旨在帮助用户高效搭建稳定的hloc开发环境。

weixin_29066781的博客 335

php如何开启soap,如何启用PHP的SOAP模块?

While working a new project of mine, SoapSource: a soap datasource forCakephp, I wanted to make use of PHP’s SOAP extension. As I figuredout quickly the default install of PHP on Mac OS X Leopard isn’...

weixin_28947253的博客 419

波动性GARCH模型与波动率预测(代码+结果分析)

本文介绍的ARCH、GARCH模型可以刻画出随时间变化的条件异方差。

celiaweiwei的博客 2万+

用php写的一个超简单的webservice

这是我电某专业课上留的小作业,写一个简单的webservice,我这里就用

just_young的专栏 3901

ESP32S3与ILI9341 LCD屏LVGL移植实战:从零构建嵌入式GUI界面

本文详细介绍了如何在ESP32S3平台上移植LVGL图形库并驱动ILI9341 LCD屏幕,从硬件选型、开发环境配置到显示驱动实现和内存优化。通过实战案例讲解移植过程中的关键步骤和常见问题解决方案,帮助开发者快速构建嵌入式GUI界面。

h9j8k7l6m5n的博客 1101

TVS 和压敏电阻联合使用进行浪涌保护时,压敏电阻的压敏电压要低于TVS 的钳位电压 VC。

通过先让MOV接管,可以确保在大多数情况下,电压不会迅速上升到TVS二极管的钳位电压,从而保护TVS二极管免受持续高能量冲击的损害。总结来说,将MOV的压敏电压设置得低于TVS二极管的钳位电压,可以提供一种分级的保护机制,优化浪涌保护性能,同时保护敏感的TVS二极管不被过度的能量冲击损坏,并延长其使用寿命。MOV吸收的能量(Wmov):假设浪涌电流为10kA,MOV导通后将电压限制在300V,那么Wmov = Ipp * Vmov = 10kA * 300V = 3MW。例如,Vmov可以设定为275V。

weixin_66642980的博客 2252

php发布webservice

对于优秀的php程序员来说不仅要会制作网页,后端的知识也要很熟练才可以。如果有一天一个从事php开发的IT公司要发展3G业务,webservice的知识一定可以帮你的忙。

技术成就梦想 2709

soap php extension

庆祝我从此又可以使用PHP5玩了玩过了Zend XmlRpc,再玩PHP5的SOAP基本上没有太多的问题,一下的示例基本上是一次成功的!玩SOAP,最麻烦的莫过于WSDL的编写(这才是我一向偏向于使用XMLRPC的原因),我一直...

cs84880702的博客 147

图解B树的原理及操作

本文主要参考:https://blog.csdn.net/shenchaohao12321/article/details/83243314 1. B树 1.1 B树的定义 B树也称B-树,它是一颗多路平衡查找树。我们描述一颗B树时需要指定它的阶数,阶数表示了一个结点最多有多少个孩子结点,一般用字母m表示阶数。当m取2时,就是我们常见的二叉搜索树。 一颗m阶的B树定义如下: 1)每个结点最多有m-1个关键字。 2)根结点最少可以只有1个关键字。 3)非根结点至少有Math.ceil(m/2)-

jinking01的专栏 3万+

Verilog SDF反标实战:从时序仿真到设计验证的完整流程解析

本文详细解析了Verilog SDF反标的完整实战流程,从时序仿真的必要性到设计验证的核心环节。文章深入拆解了SDF文件结构,并重点阐述了如何使用$sdf_annotate系统任务进行延迟反标注,将后端物理时序信息精确带回前端仿真,以实现更真实的时序验证,帮助工程师在流片前发现并修复潜在的时序违例问题。

bert9linguist的博客 705

missing php extension:soap,PHP: 安装Soap扩展

Getting SOAP working usually does not require compiling PHP from source. I would recommend trying that only as a last option.For good measure, check to see what your phpinfo says, if anything, about S...

weixin_30832021的博客 358

2.6 SST的核心性能指标体系

本文构建了固态变压器(SST)的核心性能指标体系,涵盖电气性能、可靠性、经济性和环境适配性四大类指标。电气性能指标包括运行效率(≥97%)、功率密度(≥900kVA/m³)、谐波畸变率(≤3%)等关键参数;可靠性指标设定MTBF≥43800h、年均故障率≤1.2次/年等标准;经济性指标对比分析了初始购置成本(45-55万元)和全生命周期成本(48-55万元);环境适配性指标则明确了温度、海拔等工况要求。该体系采用量化公式和国标限值,为SST的性能测试、选型和优化提供了统一标准。

技术工作者 612

安装php_soap.dll,PHP-如何安装Soap Extension?

如何安装肥皂?我收到此错误:致命错误:在第16行的/home/user/mysite.com/path/to/file.php中找不到类'SoapClient'我将网站托管在DreamHost中,并且它们不支持任何第三方安装。更新:我使用以下脚本复制了php.ini文件:http://sxi.sabrextreme.com/dh-phpini我正在使用来自网站的API,它表示如下内容:######...

weixin_39797393的博客 335

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

magento安装出现 PHP extension "soap" must be loaded.错误

在安装magento1.9的时候遇到这个错误: *magento PHP extension “soap” must be loaded. 意思就是:扩转soap必须安装,才能继续安装。*//大约在995行 ;extension=php_soap.dll 其实php本身是有soap扩展的,在php配置文件php.ini文件里,只是 默认注释掉了,把他放开就可以了 步骤如下: 1.打开php

礼貌先生的博客 1237

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

itop 安装时碰到的Missing PHP extension mysqli soap ldap

itop 安装时碰到的Missing PHP extension mysqli soap ldapyum install php-mysqlyum install php-soapyum install php-ldap重启 service httpd restart 解决此问题 转载于:https://blog.51cto.com/damingzone/2347...

weixin_34183910的博客 1874

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

php 开启soap扩展,php安装soap扩展

例:1、编译安装解压对应php版本安装包进入解压后的ext目录phpize --生成configure文件,报以下错误,可以忽略------------------------------------------------------------------------------Configuring for:PHP Api Version: 20041225Zend Modu...

weixin_28785069的博客 503

对于php实现soap代理的一个常见问题:Class 'SoapClient' not found in PHP的处理方法

首先确定,这是因为你的电脑的php.ini配置文件中的extension=php_soap.dll这个项没有或者没打开(没打开的意思是他的前面有个“;”)。这点请不用质疑。然后,你写个php文件,里面什么都不用写,就写一句“phpinfo();”即可。 如: 然后去浏览器打开这个页面。看里面的一个Loaded Configuration File的值是什么。如: 然后在电脑中找到对应

gayayzy的专栏 5613

php soap 增加代理,为php添加模块的方法-soap为例

为php添加模块的方法-soap为例默认安装,PHP里只是安装了一些常用或基本的模块,其它的要用时再添加就可以的这里模块分两种一种是php自带的模块,也就是源码里就有,不用下载一种是要另外下载的安装模块,如http://www.wdlinux.cn/bbs/thread-4-1-1.html这里只介绍,在PHP自带的模块比如SOAP首先,确定之前有下载的一键包,如果没有,先下载(也可以单独下载PH...

weixin_42113380的博客 244

soap linux php 拓展,linux carry php Soap 扩展

前言今天又出现下问题了需要解决如下:报错信息是没有soap这个扩展!解决问题如图所示:cd php-5.6.2/ext/soap//usr/local/php5/bin/phpize #进入phpize开始编译安装 ./configure -with-php-config=/usr/local/php5/bin/php-config -enable-soap 注意!这个路径用自己的!make...

weixin_33188832的博客 137

php soap扩展centos,centos下安装php的soap扩展 无需重新安装php

如下1、首先进入原先安装php版本文件夹下ext目录执行/usr/local/webserver/php/bin/phpize./configure --with-php-config=/usr/local/php5/bin/php-config --enable-soapmakemake install注:Installing shared extensions: /usr/local/...

weixin_34509784的博客 152

php soap扩展centos,linux carry php Soap 扩展

前言今天又出现下问题了需要解决如下:报错信息是没有soap这个扩展!解决问题如图所示:cd php-5.6.2/ext/soap//usr/local/php5/bin/phpize #进入phpize开始编译安装 ./configure -with-php-config=/usr/local/php5/bin/php-config -enable-soap 注意!这个路径用自己的!make...

weixin_42502896的博客 181

linux 重新编译php,Linux下安装php-soap通过重新编译php过程

首先安装完php后最好保留当时安装的文件,比如我的路径/export1/soft; html-script: false ]  cd php-5.1.6/ext/soap/usr/local/php/bin/phpize./configure --with-php-config=/usr/local/php/bin/php-config --enable-soapmakemake install1...

weixin_31516987的博客 229

php soap开启contos,记一次centos下php-SOAP拓展安装

一、如果已经有过拓展(一般php会自带安装), 可以直接在php.ini中启用二、如果第一步未生效, 如果进行动态编译安装首先确认你php根目录在哪, 根目录下的/etc (或ext)下有无soap这个目录, 如果没有请去下载php对应版本的源码包, 找到soap放入你服务器上php的对应目录:图片.png其次确认phpize 的目录, cd 到soap(我的是/opt/remi/php56/r...

weixin_42497633的博客 148

php soap 中文,php SOAP - 408582708的个人空间 - OSCHINA - 中文开源技术交流社区

提示一:SSL support is not available in this build提示二:$wsdl = file_get_contents('https://abc.asmx?wsdl');var_dump($wsdl);#返回false提示三:SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://abc.asmx?wsdl' : ...

weixin_30345873的博客 104

Linux下单独编译安装PHP扩展包

首先进入PHP源码目录,比如这个: root@vultr:~/php-7.1.10/ext/soap# 运行下PHP目录下的phpize,接着就可以和普通代码一样,配置,编译,安装了(注意:有些库可能可以配置参数) 然后要在php.ini添加这个: extension=soap.so 可通过php -m命令查询php的所有模块,可用grep筛选出想看的 转载于:https...

weixin_30670151的博客 76
上一篇: 加密解密、信息摘要算法收集
下一篇: Web Service在电信行业数据业务中的应用
smartcn
博客等级 码龄24年 1粉丝 33原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值