468,253 Members | 1,302 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

.htacess and fopen

Hello!
Some time ago I discovered a script on php.net that uses a fopen
handle on a .htaccess-protected directory to check the authorization
of a user. The crucial Code is this:

$handle = fopen("http://username:pw@domain.com/directory", "r");

(of course the username and password are variables entered by the
user)
I used this script to protect a admin-area for some time without any
problems.
But since some weeks the fopen fails even when the right "auth-data"
is entered. I think this error might be connected to the server
upgrade to php5 or any other change of the server config.
I already checked allow_fopen_url, but it's on.

So can anyone tell me why
$handle = fopen("http://username:pw@domain.com/directory", "r");
stopped working? Any server variable or change in the php-
specifications i don't know about?

Thanks,
Botho

Sep 30 '07 #1
0 1127

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Ming | last post: by
11 posts views Thread by typingcat | last post: by
28 posts views Thread by Sathyaish | last post: by
13 posts views Thread by Blue | last post: by
10 posts views Thread by pjlsr | last post: by
10 posts views Thread by Julia | last post: by
25 posts views Thread by subramanian100in | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.