Bug #71931 [Com]: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI
| From: | nunojsferreira at gmail dot com | Date: | Thu, 08 Jun 2017 17:19:41 +0000 |
| Subject: | Bug #71931 [Com]: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209423@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71931&edit=1
ID: 71931
Comment by: nunojsferreira at gmail dot com
Reported by: nikspijkerman at gmail dot com
Summary: Soap cache_wsdl WSDL_CACHE_MEMORY option on CLI
Status: Open
Type: Bug
Package: SOAP related
Operating System: Ubuntu 14.04
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
I am experiencing the exact same problem in a containerized symfony app based on docker image from
docker hub php:7.1-apache more specifically PHP 7.1.5 (cli) (built: May 13 2017 00:13:21) ( NTS )
When disabling the WSDL_CACHE_BOTH to just DISK or NONE seem to prevent the issue from happening.
I was experiencing the problem randomly. CURLing the exact same request could segfault or not.
Probably not relevant but its also a symfony 2.8 app.
Previous Comments:
------------------------------------------------------------------------
[2017-05-15 14:37:31] tech at enuygun dot com
Issue still exists in 7.1.4 and 7.1.5, debian jessie with sury php packages.
------------------------------------------------------------------------
[2017-01-27 07:58:38] tentje at gmail dot com
The issue persists in PHP 7.1.1
------------------------------------------------------------------------
[2016-11-24 03:32:21] bddenhartog at gmail dot com
I have this same issue running PHP-CGI under IIS.
The server is Windows Server 2012 R2 Datacenter.
------------------------------------------------------------------------
[2016-11-02 23:02:48] gcarrette at wayfair dot com
Related To: Bug #50722
------------------------------------------------------------------------
[2016-11-02 22:49:44] gcarrette at wayfair dot com
Here is a self-contained simple script you can use to reproduce this at will.
The script was derived from a bug report 50722, but adds a real wsdl reference url. I also get the
same error in a more complex application, with only 1 wsdl
file. The work around is to stick with WSDL_CACHE_DISK and avoid MEMORY/BOTH.
$wsdl_url = 'https://webservices.sandbox.netsuite.com/wsdl/v2013_2_0/netsuite.wsdl';
$wsdl_xml = file_get_contents($wsdl_url);
for($j = 1; $j <= 6; $j++) {
$status = file_put_contents("wsdl-file-$j.wsdl", $wsdl_xml);
if ($status === false) {
echo "ERROR: Failed to write wsdl-file-$j.wsdl\n";
}
}
ini_set('soap.wsdl_cache_enabled', 1);
ini_set('soap.wsdl_cache', WSDL_CACHE_MEMORY);
ini_set('soap.wsdl_cache_limit', 5); // Note: Cache size of 5.
function test($x)
{
$client1 = new SoapClient("./wsdl-file-1.wsdl");
$client2 = new SoapClient("./wsdl-file-2.wsdl");
$client3 = new SoapClient("./wsdl-file-3.wsdl");
$client4 = new SoapClient("./wsdl-file-4.wsdl");
$client5 = new SoapClient("./wsdl-file-5.wsdl");
return $x; //web server segfaults or corrupt XML returned
}
$server = new SoapServer("./wsdl-file-6.wsdl");
$server->addFunction("test");
$server->handle();
test(null);
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71931
--
Edit this bug report at https://bugs.php.net/bug.php?id=71931&edit=1