Bug #70271 [NEW]: Php SoapServer crashed after second SoapFault

From: Date: Fri, 14 Aug 2015 15:06:03 +0000
Subject: Bug #70271 [NEW]: Php SoapServer crashed after second SoapFault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195208@lists.php.net to get a copy of this message
From: miracle at rpz dot name Operating system: Irrelevant PHP version: 5.6.12 Package: SOAP related Bug Type: Bug Bug description:Php SoapServer crashed after second SoapFault 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 bug report at https://bugs.php.net/bug.php?id=70271&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70271&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70271&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70271&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70271&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70271&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70271&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70271&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70271&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70271&r=support Expected behavior: https://bugs.php.net/fix.php?id=70271&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70271&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70271&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70271&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70271&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70271&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70271&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70271&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70271&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70271&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70271&r=mysqlcfg

« previous php.bugs (#195208) next »