title: Segmentation Fault error in PHP, using SOAP to connect to SalesForce
body: <p>I'm integrating my software (PHP) with SalesForce, using the SalesForce PHP Toolkit.  </p>
  
  <p>So far, everything's worked great, but when I started writing the code to call convertLead(), I got a "Segmentation Fault" error.</p>
  
  <p>This is the code I'm running:</p>
  
  <pre><code>require_once('../salesforce/SforceEnterpriseClient.php');
  ini_set('soap.wsdl_cache_enabled', 0);
  $SForce = new SforceEnterpriseClient();
  
  $result = $SForce-&gt;createConnection('../salesforce/enterprise.wsdl.xml');
  $result = $SForce-&gt;login('user', 'pass+token');
      echo "Logged In!";
  $data = array(
      'convertedStatus' =&gt; 'Converted',
      'leadId' =&gt; '00QC000000mDcmJMAS'
  );
  $result = $SForce-&gt;convertLead(array($data));
  </code></pre>
  
  <p>That's it. And i'm getting a Segmentation Fault. I tried using StdClass instead of a keyed array, same thing. The convertLead method in the SF toolkit is really simple, it just calls the same method into a SoapClient instance...</p>
  
  <p><strong>NOTE:</strong> I'm running this script from the CLI, not through Apache.</p>
  
  <hr>
  
  <p>UPDATE: Just tried running "strace" with my script. The last lines of it are:</p>
  
  <pre><code>close(4)                                = 0
  write(1, "Logged IN!", 10Logged IN!)              = 10
  open("error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 4
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  +++ killed by SIGSEGV +++
  </code></pre>
  
  <p>Also, in case it's relevant: </p>
  
  <pre><code>php --version
  PHP 5.2.13 (cli) (built: Jul 17 2010 22:01:13)
  Copyright (c) 1997-2010 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
      with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
      with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
      with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
  </code></pre>
  
  <p>This also happens in my dev machine (Windows), so I doubt it's the Accelerators or anything like that:</p>
  
  <pre><code>php --version
  PHP 5.2.13 (cli) (built: Feb 24 2010 14:37:44)
  Copyright (c) 1997-2010 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  </code></pre>
  
  <hr>
  
  <p>This may or may not be specific to SalesForce. Probably not, seems like a bug in the SOAP PHP library. Maybe the request/response are broken, but I can't see those because they're HTTPS.</p>
  
  <p>Any ideas how I can go about diagnosing (or more importantly, working around) this issue?</p>
  
  <p>Thank!<br>
  Daniel</p>