I'm moving a site from a shared host to a Digital Ocean droplet (Ubuntu 14 w/Apache). It's a Codeigniter-based PHP site. The site is all working on the DO droplet, except for our Mandrill integration.
To narrow down whether its other code in the controller, I've put together a test page. It works at the old host but on the new site throws a 500 error:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Testemail extends CI_Controller {
function __construct() {
parent::__construct();
}
function index() {
require_once(APPPATH.'libraries/mandrill/Mandrill.php');
// comment out the next line and the page loads fine
$mandrill = new Mandrill('my_api_key');
// there's other code here to compose and send a message
}
}
// there's no closing ?> in a Codeigniter file
Simply instantiating the Mandrill class is all it takes to throw the 500. The path to the library is correct. I've confirmed I'm using a valid key, and even created a new Mandrill key just in case. There is nothing in the Apache logs, nor in the Codeigniter logs, nor in the Mandrill API logs.
Everything I've found so far relates to 500 errors after attempting to send a message. But, I'm not even getting that far. I've commented out all the actual sending statements to leave just what you see above and I still get the 500.
Ubuntu 14.04, Apache 2.4.7, PHP 5.5.9, Codeigniter 2.2.6, Mandrill 1.0.55
Edit: I can send mail using Codeigniter's email helper and the Mandrill SMTP settings. I would prefer to use the API for performance reasons. But SMTP will do for now.
Edit: Apparently I can't easily close my own question. This is appears to be a Codeigniter issue, not a Mandrill issue. I've found some other controllers that are throwing the 500. During the transfer, I did upgrade CI which I'm sure now is the source of my troubles.