{"id":330,"date":"2014-09-06T12:25:02","date_gmt":"2014-09-06T12:25:02","guid":{"rendered":"https:\/\/www.joetannorella.com\/?p=330"},"modified":"2014-09-06T12:25:51","modified_gmt":"2014-09-06T12:25:51","slug":"sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps","status":"publish","type":"post","link":"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/","title":{"rendered":"SendGrid “Fatal error: Call to undefined function curl_init()” on DigitalOcean VPS"},"content":{"rendered":"

This is another “dur” moment, but it’s worth jotting down for anyone else to find\u00a0after they have the issue. Though, I’m not sure anyone else would have missed such an obvious problem!<\/p>\n

So as soon as I installed SendGrid on to my Digital Ocean VPS, all the backend stopped working. I changed over to WP_DEBUG=TRUE and found that I was having the following error:<\/p>\n

\r\nFatal error: Call to undefined function curl_init() in \/var\/www\/alexmartin\/wp-content\/plugins\/sendgrid-email-delivery-simplified\/lib\/class-sendgrid-tools.php on line 17\r\n<\/pre>\n

I’m so used to having curl already installed on my machine and existing VPS’s that I had forgotten to install it on this new one I’d just spun up. SendGrid needs to use Curl in order to make the API calls and thus function properly.<\/p>\n

Luckily, fixing this is easy. You just need to instal the curl PHP extension. On your server:<\/p>\n

\r\napt-get install php5-curl\r\nservice nginx restart\r\n<\/pre>\n

Don’t forget to change “nginx” to “apache2” if you’re using Apache \ud83d\ude42<\/p>\n

Hope this helps!<\/p>\n","protected":false},"excerpt":{"rendered":"

This is another “dur” moment, but it’s worth jotting down for anyone else to find\u00a0after they have the issue. Though, I’m not sure anyone else would have missed such an obvious problem! So as soon as I installed SendGrid on to my Digital Ocean VPS, all the backend stopped working. I changed over to WP_DEBUG=TRUE…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"\nSendGrid "Fatal error: Call to undefined function curl_init()" on DigitalOcean VPS - JoeTannorella.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SendGrid "Fatal error: Call to undefined function curl_init()" on DigitalOcean VPS - JoeTannorella.com\" \/>\n<meta property=\"og:description\" content=\"This is another “dur” moment, but it’s worth jotting down for anyone else to find\u00a0after they have the issue. Though, I’m not sure anyone else would have missed such an obvious problem! So as soon as I installed SendGrid on to my Digital Ocean VPS, all the backend stopped working. I changed over to WP_DEBUG=TRUE...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"JoeTannorella.com\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-06T12:25:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-09-06T12:25:51+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/\",\"url\":\"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/\",\"name\":\"SendGrid \\\"Fatal error: Call to undefined function curl_init()\\\" on DigitalOcean VPS - JoeTannorella.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.joetannorella.com\/#website\"},\"datePublished\":\"2014-09-06T12:25:02+00:00\",\"dateModified\":\"2014-09-06T12:25:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.joetannorella.com\/#\/schema\/person\/84eafed4ad6cd6934b006e371c06c7ae\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.joetannorella.com\/#website\",\"url\":\"https:\/\/www.joetannorella.com\/\",\"name\":\"JoeTannorella.com\",\"description\":\"Web Development | Digital Marketing | Business\/Startups | Analytics\/data\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.joetannorella.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.joetannorella.com\/#\/schema\/person\/84eafed4ad6cd6934b006e371c06c7ae\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.joetannorella.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/257001162d06da1a465f242dfa80dd7b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/257001162d06da1a465f242dfa80dd7b?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/www.joetannorella.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SendGrid \"Fatal error: Call to undefined function curl_init()\" on DigitalOcean VPS - JoeTannorella.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/","og_locale":"en_US","og_type":"article","og_title":"SendGrid \"Fatal error: Call to undefined function curl_init()\" on DigitalOcean VPS - JoeTannorella.com","og_description":"This is another “dur” moment, but it’s worth jotting down for anyone else to find\u00a0after they have the issue. Though, I’m not sure anyone else would have missed such an obvious problem! So as soon as I installed SendGrid on to my Digital Ocean VPS, all the backend stopped working. I changed over to WP_DEBUG=TRUE...","og_url":"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/","og_site_name":"JoeTannorella.com","article_published_time":"2014-09-06T12:25:02+00:00","article_modified_time":"2014-09-06T12:25:51+00:00","author":"admin","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/","url":"https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/","name":"SendGrid \"Fatal error: Call to undefined function curl_init()\" on DigitalOcean VPS - JoeTannorella.com","isPartOf":{"@id":"https:\/\/www.joetannorella.com\/#website"},"datePublished":"2014-09-06T12:25:02+00:00","dateModified":"2014-09-06T12:25:51+00:00","author":{"@id":"https:\/\/www.joetannorella.com\/#\/schema\/person\/84eafed4ad6cd6934b006e371c06c7ae"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.joetannorella.com\/sendgrid-fatal-error-call-undefined-function-curl_init-digitalocean-vps\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.joetannorella.com\/#website","url":"https:\/\/www.joetannorella.com\/","name":"JoeTannorella.com","description":"Web Development | Digital Marketing | Business\/Startups | Analytics\/data","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.joetannorella.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.joetannorella.com\/#\/schema\/person\/84eafed4ad6cd6934b006e371c06c7ae","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.joetannorella.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/257001162d06da1a465f242dfa80dd7b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/257001162d06da1a465f242dfa80dd7b?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/www.joetannorella.com\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/posts\/330"}],"collection":[{"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":2,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":332,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/posts\/330\/revisions\/332"}],"wp:attachment":[{"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/media?parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/categories?post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joetannorella.com\/wp-json\/wp\/v2\/tags?post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}