Edit report at https://bugs.php.net/bug.php?id=63780&edit=1
ID: 63780 Updated by: php-bugs@lists.php.net Reported by: php dot maks3w at virtualplanets dot net Summary: Segmentation fault when try to get $request -Status: Feedback +Status: No Feedback Type: Bug Package: SOAP related PHP Version: 5.4.9 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2013-01-23 11:11:19] saschaprolic at googlemail dot com I experienced the same bug. You can find my strace log at: https://gist.github.com/4604494 ------------------------------------------------------------------------ [2012-12-16 11:17:29] re...@php.net 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. ------------------------------------------------------------------------ [2012-12-15 18:06:17] php dot maks3w at virtualplanets dot net Description: ------------ Situation: Custom class which extend from SoapClient and override "public function __doRequest($request, $location, $action, $version, $one_way = null)" $request can't be used to compare strings, instead throw a Segmentation Fault error. $request looks like a C Pointer or any other type instead of a PHP String type As workaround you can filter the variable passing the value through a function which return basically the same value of the argument passed as input (like ltrim) after that it's possible save the returned value and now is a normal PHP String and can be compared. Test script: --------------- FAILING CODE: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this->lastRequest = $request; } $this->assertEquals('SomeContent', $this->lastRequest); // Segmentation Faul. WORKAROUND: public $lastRequest; function __doRequest($request, $location, $action, $version, $one_way = 0) { $this->lastRequest = ltrim($request); // Pass $request through a function } $this->assertEquals('SomeContent', $this->lastRequest); // Works ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63780&edit=1