I wanted to add the mandrill email delivery ibrary into our php webapplication. Mandrill however gave me the following error: "Call to undefined function curl_init() "
So I had to add the curl module to my php application. It takes only 2 minutes via google to find out how to install the module on our server, basically just "sudo apt-get install php5-curl".
But event after installing curl the error still appeared. So using google again I foud out, that I should use phpinfo() to see if curl is actually installed. It wasn't.
After another research I found out, that I had to restart nginx and php5-fpm, so that the newly added module is loaded. I used "server php5-fpm restart", but event then the module wasn't loaded.
It took another research to find out, that installing the curl module created a curl.ini file in the /etc/php5/fpm/conf.d folder and that this file needs to be loaded. Looking at phpinfo I found out that file wasn't loaded.
Not this problem took me several hours, but I finally found out that there is a bug in Ubuntu that leaves idle php5-fpm processes remaining: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1242376
So I had to:
- Manually kill all php5-fpm processes my Ubuntu Server
- To be able to restart/reload php5-fpm
- So that the newly installed curl module is loaded
- So that my php webapplication can use the curl module
- So that the mandrill library can use the curl functionality