title: Segmentation Fault on simple Gearman code. PHP Cli
body: <p>This is very sad story. I'm trying to start using Gearman in my project. But can't to run simple test.</p>
  
  <pre><code>root@140141-10009:~# cat /etc/lsb-release
  DISTRIB_ID=Ubuntu
  DISTRIB_RELEASE=12.04
  DISTRIB_CODENAME=precise
  DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>root@140141-10009:~# php -v
  PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 18:59:41)
  Copyright (c) 1997-2012 The PHP Group
  Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
  </code></pre>
  
  <p>Gearman</p>
  
  <pre><code>root@140141-10009:~# gearmand -V
  gearmand 0.34 - https://bugs.launchpad.net/gearmand
  </code></pre>
  
  <p>PHP PECL Gearman 1.1.0, compliled from source without errors. All (2) tests passed. No other PHP extensions are enabled.</p>
  
  <p>client.php:</p>
  
  <pre><code>&lt;?php
  $client = new GearmanClient();
  $client-&gt;addServer('127.0.0.1');
  $client-&gt;setTimeout(10000);
  $client-&gt;addTask('taskplus2', 10);
  $client-&gt;addTask('taskplus2', 15);
  $client-&gt;runTasks();
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>root@140141-10009:~/gearman/proto# php client.php
  Segmentation fault
  </code></pre>
  
  <p>dmesg:</p>
  
  <pre><code>[15066.824900] php[20520]: segfault at f ip 00007f128470ba40 sp 00007fffd9f1dd28 error 4 in libc-2.15.so[7f12845c1000+1b5000]
  </code></pre>
  
  <p>I already tried PHP 5.3, 5.4, Ububtu 10.04, 12.04, using gearman-ppa and not using. I also tried PECL Gearman 0.8.1, 0.8.3, 1.0.2, 1.0.3, 1.1.0. Installing that all to clean-setup of Ubuntu. Googling of <code>libc6 gearman</code> was no effect.</p>