Bug #70271 [Opn->Fbk]: Php SoapServer crashed after second SoapFault

From: Date: Tue, 18 Aug 2015 14:54:51 +0000
Subject: Bug #70271 [Opn->Fbk]: Php SoapServer crashed after second SoapFault
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195297@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70271&edit=1

 ID:                 70271
 Updated by:         laruence@php.net
 Reported by:        miracle at rpz dot name
 Summary:            Php SoapServer crashed after second SoapFault
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            SOAP related
 Operating System:   Irrelevant
 PHP Version:        5.6.12
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2015-08-14 15:05:56] miracle at rpz dot name

Description:
------------
On first SoapFault server respond with status 500 (expected behavior).
On next fault server crashed.

Reproduced on windows and linux, with all 5.6.* versions, php-cli and mod_php, works fine on 5.5 and
5.4.

Test script:
---------------
<?php
    if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD']
== 'POST') {
        $srv = new SoapServer(null, ['uri' => 'http://test-uri/']);
        $srv->handle();
    } else {
        if (DIRECTORY_SEPARATOR == '\\') {
            // windows
            $phpRoot = 'c:\php56';
            $args = sprintf('"%s\php.exe" -d extension_dir=%s\ext -d
extension=php_soap.dll -S %s:%d -t %s', $phpRoot, $phpRoot,  '127.0.0.1', 8081,
__DIR__);
            $cmd =  'start "srv" ' . $args;
            pclose(popen($cmd, "r"));
        } else {
            // linux
            $cmd = 'php -S 127.0.0.1:8081 -t ' . __DIR__ . ' > /dev/null
2>&1 &';
            exec($cmd);
        }
	    // wait for starting web-server
        sleep(10);
        
        $client = new SoapClient(null, ['uri' => 'http://test-uri', 'location' => 'http://127.0.0.1:8081/' . basename(__FILE__)]);

        try {
            $client->unknownMethod(); // expected exception
        } catch (Exception $e) {
            var_dump($e->getMessage());
        }
 
        // any "normal" requests here
        
        try {
            $client->unknownMethod(); // server crashed here
        } catch (Exception $e) {
            var_dump($e->getMessage());
        }        
    }

Expected result:
----------------
string(38) "Function 'unknownMethod' doesn't exist"
string(38) "Function 'unknownMethod' doesn't exist"

Actual result:
--------------
string(38) "Function 'unknownMethod' doesn't exist"
string(27) "Error Fetching http headers"


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70271&edit=1


Thread (4 messages)

« previous php.bugs (#195297) next »