|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32925 HTTP Authentication is not carried through upon redirects.
Submitted: 2005-05-03 13:21 UTC Modified: 2005-07-22 01:00 UTC
From: wb at pro-net dot co dot uk Assigned:
Status: No Feedback Package: HTTP related
PHP Version: 5.0.4 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 - 32 = ?
Subscribe to this entry?

 [2005-05-03 13:21 UTC] wb at pro-net dot co dot uk
When using fopen() it seems that authentication details are not passed through upon a redirect and you will get a HTTP/1.1 401 Authorization Required.

The server i am trying has a virtual host of the following...

    RewriteEngine on
    RewriteRule ^/(.*)$1 [R,L]

Which will just redirect the request to another location where authentication is needed.

Reproduce code:
$fp = fopen('', 'rb');

Expected result:
Resource id #2

Actual result:
PHP Warning:  fopen(): HTTP request failed! HTTP/1.1 401 Authorization Required


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-14 08:58 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-07-22 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 23:01:31 2024 UTC