title: Squid Proxy Authentication fails
body: <p>I followed this <a href="https://www.linode.com/docs/networking/squid/squid-http-proxy-ubuntu-12-04" rel="nofollow">tutorial</a> to setup my proxy server. 
  Installed Squid and apache2-utils</p>
  
  <p>Created username and password using htpasswd</p>
  
  <pre><code>sudo htpasswd /etc/squid3/squid_passwd myusername
  </code></pre>
  
  <p>Appended the folowing lines to squid.conf</p>
  
  <pre><code>auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_passwd
  auth_param basic credentialsttl 2 hours
  auth_param basic casesensitive off
  acl ncsa_users proxy_auth REQUIRED
  http_access allow ncsa_users
  </code></pre>
  
  <p>restarted squid server. And checked username and password in cmd. It says Ok</p>
  
  <pre><code>/usr/lib/squid3/ncsa_auth /et/squid3/squid_passwd
  myusername password
  OK
  </code></pre>
  
  <p>But i am not able to access from PHP</p>
  
  <pre><code>$proxy = "111.11.11.11:8220"; // my squid ip and port
  $proxyauth =   base64_encode('username:pass');   // Tried without base64_encode also  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL,$url);
  curl_setopt($ch, CURLOPT_PROXY, $proxy);
  curl_setopt($ch, CURLOPT_PROXYUSERPWD,  $proxyauth);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HEADER, 1);
  $curl_scraped_page = curl_exec($ch);
  echo $curl_scraped_page;
  if(curl_error($ch))
  {
      echo 'error:' . curl_error($ch);
  
  }
  curl_close($ch);
  </code></pre>
  
  <p>But i am getting  X-Squid-Error: ERR_ACCESS_DENIED  error </p>