php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33716 HTTP authentication
Submitted: 2005-07-15 22:38 UTC Modified: 2005-07-24 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: jacka at torreycommerce dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.0.4 OS: linux
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:
MUST BE VALID
Solve the problem:
31 - 16 = ?
Subscribe to this entry?

 
 [2005-07-15 22:38 UTC] jacka at torreycommerce dot com
Description:
------------
It appears that the constructor of SoapClient is completely ignoring the second argument (options). I am trying to use basic http authentication, but regardless of what I send as the options parameter I get the same result.







Reproduce code:
---------------
$woptions['soap_version']=SOAP_1_2;
$woptions['login']="";
$woptions['password']="";

$client = new SoapClient("http://wsdl_that_uses_basic_HTTP_auth",$woptions);



Expected result:
----------------
It should return no errors or warnings.

Actual result:
--------------
PHP Warning:  SoapClient::__construct(http://wsdl_that_uses_basic_HTTP_auth): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required
 in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8
PHP Warning:  I/O warning : failed to load HTTP resource in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://merchant-api-qa.amazon.com/gateway/merchant-interface-mime' in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8
PHP Fatal error:  Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://wsdl_that_uses_basic_HTTP_auth' in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php:8
Stack trace:
#0 /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php(8): SoapClient->__construct('http://wsdl_that_uses_basic_HTTP_auth', Array)
#1 {main}
  thrown in /var/www/html/engine_cvs/misc_scripts/amazon/soaptest.php on line 8

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-16 22:17 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-07-24 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: Tue Apr 16 23:01:30 2024 UTC