|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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
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                        
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 $?
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=1 test.php; echo $?
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=2 test.php; echo $?
root@0d2dbb96cd17:/data# php -d soap.wsdl_cache=3 test.php; echo $?

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:


$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.


Add a Patch

Pull Requests

Add a Pull Request


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]
-Status: Open +Status: Duplicate
 [2018-01-01 21:31 UTC]
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: Tue Feb 27 14:01:32 2024 UTC