Hello, I just spent a lot of my time trying to figure out why credentials() was not working for me. I finally met up with someone on IRC that had experienced the same issue as I was having and got it cleared up.
The problem is that I was putting http://somedomain.com into $netloc, the first parameter to the function. The does for this method don't say anything about needing a port number or needing to not have a protocol prepend like http://. In fact, the docs don't even say what $netloc is. I believe if the docs for this method were just elaborated a bit and the params described one by one this would never happen again. The user and pass are pretty straightforward but realm and netloc are probably the least obvious to people that are not aware of the intimate details of the HTTP protocol. Nonetheless, I would think it better to describe them all for the sake of completeness. I was going to write a patch but I think you should have received one from the guy who helped me out on this. Thanks, Justin DeVuyst Jman Consulting