Segmentation Fault using Zend Server with SSL and Curl

Using the apache module mod_ssl and the php extension curl may result in apache not running. Usually there's something like this in the logs: seg fault or similar nasty error detected in the parent process

It took me quite a while to figure out how to get this working nevertheless, perhaps I can save someone else's time!!

This works with Zend Server 6.3 and PHP 5.5, but it may also run with older versions.

First install the php source package: apt-get install php-5.5-source-zend-server

The problem is that the module is linked to an older version of libssl, you can fix that by recompiling the php module:

cd /usr/local/zend/share/php-source/php-`php -v| grep built| awk '{print $2}'`/ext/curl
make install

If the extension is activated (/usr/local/zend/etc/conf.d/curl.ini should contain, you can just restart zend-server and that's it!