php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72937 SOAP WSDL memory cache alters interpreter exit code
Submitted: 2016-08-25 08:06 UTC Modified: 2018-01-01 21:31 UTC
From: luza dot mbox at gmail dot com Assigned:
Status: Duplicate Package: SOAP related
PHP Version: 7.0.10 OS: Debian Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: luza dot mbox at gmail dot com
New email:
PHP Version: OS:

 

 [2016-08-25 08:06 UTC] luza dot mbox at gmail dot com
Description:
------------
When WSDL caching is enabled and cache in memory option is used, and WSDL consists of several files imported by using <xsd:import /> tag, PHP interpreter exit code appears to be 1 instead of 0.

PHP 7.0.10 (cli) (built: Aug 19 2016 18:46:19) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.10, Copyright (c) 1999-2016, by Zend Technologies

root@0d2dbb96cd17:/data# php -i | grep soap                        
/usr/local/etc/php/conf.d/docker-php-ext-soap.ini,
soap
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=0 test.php; echo $?
0
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=1 test.php; echo $?
0
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=2 test.php; echo $?
1
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=3 test.php; echo $?
1


Configure Command =>  './configure'  '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--disable-cgi' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--enable-fpm' '--with-fpm-user=www-data' '--with-fpm-group=www-data'


Test script:
---------------
test.php:

<?php

$wsdl = 'https://api.hermes-dpd.ru/ws/webservice.svc?wsdl';
$bu   = '5';

$soapClient = new SoapClient($wsdl, ['soap_version' => SOAP_1_1]);

try {
    $result = $soapClient->GetParcelShops(['businessUnitCode' => $bu]);
} catch (\Exception $e) {
}


Expected result:
----------------
Interpreter exit code is 0.

Actual result:
--------------
Interpreter exit code is 1 when WSDL caching in memory is enabled and WSDL consists of several files.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-25 08:11 UTC] luza dot mbox at gmail dot com
Described behaviour appears on 7.X only. Version 5.6 has not such issue.
 [2018-01-01 21:31 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2018-01-01 21:31 UTC] nikic@php.net
It looks like this is another manifestation of bug #75502. For me, when using a debug build, your test case doesn't just set the wrong exit code, but crashes entirely. After fixing bug #75502 the test case runs through and has exit status 0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 13:01:28 2024 UTC