title: http basic authentication error in symfony
body: <p>In my project (a web API) done with Symfony 2.2 I have set http basic authentication. It works ok locally (tested in windows last XAMPP stable release and mysql db in a local mac with Lion), so I think it's not a password encoding issue.
  We have a managed server with a couple of versions of php installed. PHPinfo in our app dir says 5.4.16 with CGI/FastCGI. We are only allowed to change parameters through .htaccess
  We have it for now in a subdir of our main site as <a href="http://oursite.com/projectName/symfonyDirsHere(app" rel="nofollow">http://oursite.com/projectName/symfonyDirsHere(app</a>, web, etc...)</p>
  
  <p>In dev.log:
  security.INFO: Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.) [] []
  So I suspect is fastcgi problem not passing authorization parameters as it's explained in src/symfony/src/Symfony/Component/HttpFoundation/ServerBag.php
  but I can't make it work, maybe because I'm not in a root domain directory with a redirect to /web?
  I don't see anything about mod-rewrite at phpinfo. Maybe it's not enabled?</p>
  
  <p>My htaccess:</p>
  
  <pre><code>DirectoryIndex app.php
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteRule ^app\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule .? - [L]
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
      RewriteRule ^(.*) - [E=BASE:%1]
      RewriteRule .? %{ENV:BASE}app.php [L]
  #Esto por el tema del fastcgi en apache
  RewriteCond %{HTTP:Authorization} ^(.+)$
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  SetEnv TZ Europe/Madrid
  &lt;/IfModule&gt;
  &lt;IfModule !mod_rewrite.c&gt;
      &lt;IfModule mod_alias.c&gt;
          RedirectMatch 302 ^/$ /app.php/
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I'll appreciate any help/suggestions/ideas to solve the problem. Thank you in advance</p>