|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63780 Segmentation fault when try to get $request
Submitted: 2012-12-15 18:06 UTC Modified: 2013-02-18 00:36 UTC
Avg. Score:4.3 ± 0.5
Reproduced:2 of 3 (66.7%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: php dot maks3w at virtualplanets dot net Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.4.9 OS:
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: php dot maks3w at virtualplanets dot net
New email:
PHP Version: OS:


 [2012-12-15 18:06 UTC] php dot maks3w at virtualplanets dot net
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 

$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:
public $lastRequest;

function __doRequest($request, $location, $action, $version, $one_way = 0) {
    $this->lastRequest = $request;

$this->assertEquals('SomeContent', $this->lastRequest); // Segmentation Faul.

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-16 11:17 UTC]
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 for *NIX and 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-16 11:17 UTC]
-Status: Open +Status: Feedback
 [2013-01-23 11:11 UTC] saschaprolic at googlemail dot com
I experienced the same bug. You can find my strace log at:
 [2013-02-18 00:36 UTC] php-bugs at lists dot php dot net
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.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 16 20:01:23 2021 UTC