|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27777 basic authentication broken
Submitted: 2004-03-30 08:33 UTC Modified: 2004-04-12 17:55 UTC
Avg. Score:4.5 ± 0.8
Reproduced:123 of 127 (96.9%)
Same Version:26 (21.1%)
Same OS:36 (29.3%)
From: mikx at mikx dot de Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.0.0RC1 OS: Windows XP Pro
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-03-30 08:33 UTC] mikx at mikx dot de
When using basic authentication the soap client does not authenticate itself automaticly using the options array. You need to add the login and password in the uri.

Reproduce code:
_NOT working_

$client = new SoapClient("", array(
   "login"      => "yourLogin", 
   "password"  => "yourPassword")); 


$client = new SoapClient("");

Expected result:
The SOAP client should take the login and password from the options array and automaticly authenticate itself.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-02 00:27 UTC]
Authentication should work for SOAP requests, but it is not working during requesting of WSDL file (not implemented).

Do you have problem only with WSDL loading or with SOAP requests too?
 [2004-04-02 04:57 UTC] mikx at mikx dot de
At the momenten i have no non-wsdl demo case available, but it seems soap requests are working fine. 

If i remove the login/password from the options array i can only call __getFunctions() but none of the functions reported by it. I think that means i have got the wsdl file through uri authentication but the soap calls fail.

After adding the login/password also to the options array i can call both __getFuntions() and testFunction() - a "hello world" testcase. Therefore adding login/password in the array seems to work like expected.
 [2004-04-07 04:48 UTC]
So what's the bug then if it works? 

 [2004-04-12 17:55 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2004-08-05 15:32 UTC] technique at kaiman dot fr
I've the same probleme here with 5.0.0 on freebsd 4.3

the SOAP client doesn't authenticate himself with login and pass of options array when retrieving the wsdl file but do it correctly on SOAP request.

So I can't instanciate a SOAP client with a protected wsdl file.

I've a network capture of this, contact me if you need it.

 [2005-04-12 14:33 UTC] lobbin at localhost dot nu
This is still a problem. The soap-extension is not able to get a password-protected wsdl even though the credentials are provided and used when posting the real soap-request.
 [2006-05-19 09:01 UTC] peter at adkins dot nl
This is still a problem with 5.1.1.
 [2007-04-05 15:21 UTC] jgarcia at tdg-i dot com
Bug still open in PHP 5.1.2 

Found information from user post:
 Arjan van Bentem
12-Aug-2005 08:31
When using HTTP basic authentication, PHP will only send the credentials when invoking the service, not when fetching the WSDL.
 [2008-06-19 14:16 UTC] trippinbilly25 at gmail dot com
This is still a problem in 5.2.6.
 [2009-05-07 13:32 UTC] Christian dot Reingruber at gmail dot com
still a problem in 5.2.8 i guess... any ideas?
 [2010-01-29 21:38 UTC] eric dot caron at gmail dot com
Still having this problem as of PHP 5.3.2-dev on my Linux boxes. PHP 5.3.1 on my Windows box did not have this problem.
 [2010-11-15 16:56 UTC] oliver at teqneers dot de
I have the same problem in PHP 5.3.3.

It is not possible to fetch a HTTP basic/digest authentication protected WSDL.
 [2011-10-20 00:37 UTC] dewes at pop dot com dot br
The problem still in PHP Version 5.3.5.
 [2012-06-13 09:00 UTC] oliver at mojofuel dot com
Still exists in PHP 5.3.13
 [2013-02-28 08:57 UTC] stephan dot schulze at kapthon dot com
This problem still exists in PHP 5.3.20
 [2013-03-31 13:29 UTC] roeycohen at gmail dot com
using php 5.4.8, this described problem seems to work with basic authentication 
but not with DIGEST.
 [2016-01-08 13:31 UTC] div at mail172 dot de
PHP Version 5.3.10-1ubuntu3.13, WSDL located behind basic authetication, no problems receiving the wsdl, using login and password in options array. Calling the functions works as well.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC