title: Attempted to call function "curl_init"
body: <p>I know this question was answered a lot of times <a href="https://stackoverflow.com/search?q=call%20to%20undefined%20function%20curl_init">here</a> but I tried many things and I cannot fix it.</p>
  
  <p>I am developing using symfony 3.</p>
  
  <p>First of all I thought I hadn't php-curl so, I decided to install it doing</p>
  
  <blockquote>
    <p>sudo apt-get install php-curl</p>
  </blockquote>
  
  <p>It worked! So, I restarted Apache... and tried again.. and the error jumped again. I saw too I should  <em>"delete"</em> the <strong>; of a php.ini line</strong> but... surprise! There is not any line with:</p>
  
  <blockquote>
    <p>;extension=php_curl.dll</p>
  </blockquote>
  
  <p>I thought then maybe I didn't really install php-curl... so I did:</p>
  
  <blockquote>
    <p>var_dump(extension_loaded('curl'));</p>
  </blockquote>
  
  <p>And the answer is:</p>
  
  <blockquote>
    <p>Current PHP version: 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1</p>
  </blockquote>
  
  <p>EDIT: I followed <a href="https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php" rel="nofollow noreferrer">this</a>:</p>
  
  <p>And now appears </p>
  
  <blockquote>
    <p>Current PHP version: 5.6.26-1+deb.sury.org~xenial+1</p>
  </blockquote>
  
  <p>Then I tried to:</p>
  
  <blockquote>
    <p>sudo apt-get install php5-curl</p>
  </blockquote>
  
  <p>And is happens:</p>
  
  <blockquote>
    <p>tureey@tureey:~$ sudo apt-get install php5-curl</p>
    
    <p>Reading package lists... Done
    Building dependency tree</p>
    
    <p>Reading state information... Done</p>
    
    <p>E: Unable to locate package php5-curl</p>
  </blockquote>
  
  <p>Actually these are my software stats:</p>
  
  <ul>
  <li>Distributor ID:  Ubuntu</li>
  <li>Description: Ubuntu 16.04.1 LTS</li>
  <li>Release: 16.04</li>
  <li>Codename:    xenial</li>
  </ul>
  
  <p>And after do:</p>
  
  <blockquote>
    <p>php -v</p>
  </blockquote>
  
  <p>PHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 (cli) </p>
  
  <p>Copyright (c) 1997-2016 The PHP Group</p>
  
  <p>Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
      with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies</p>
  
  <p>I did and upgrade and update but nothing changes... any solution?</p>