Problems using XAMPP with PHP and https

Forum for .PHP developers using the E-conomic API.
Exchange your ideas, tip and tricks using the API.
Best Practices

Problems using XAMPP with PHP and https

Postby fsa » Wed May 20, 2009 1:18 pm

I was wondering if anyone has experience with accessing the E-conomic API using PHP(SOAP). We are currently experiencing problems running the example internally (at E-conomic, yes a bit embarrasing) and therefore I wanted to get to the bottom of the problem. So I downloaded and installed the XAMPP package, allowing me to run .php files locally. ( To clarify: I want to run the example locally, hitting the LIVE E-conomicWebservice)
In the E-conomic API bundle, a php example file is located at e-conomic_API_1.4.0\php\list_debtors.php.

I have tried to run the file, on my local XMAPP server like this:
Code: Select all
http://localhost:81/list_debtors.php?agreementNumber=123456&username=myUser&password=myPass


I get the following error when creating the SoapClient:

Code: Select all
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL" in C:\xampp\htdocs\list_debtors.php on line 40

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL' : failed to load external entity "https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL"

Fatal error: Call to a member function Disconnect() on a non-object in C:\xampp\htdocs\list_debtors.php on line 230


Having the source code for the API, i compiled a new E-conomic_API.dll, which hit the webservice running on localhost.

So i changed list_debtors.php line 37
Code: Select all
//$wsdlUrl = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL'; to this one
$wsdlUrl = 'http://localhost/api1/EconomicWebService.asmx?WSDL';


adn suddenly my example works.

What am I doing wrong here?
I have tried different approaches:
  • Adding the necessary SSL modules to Apache httpd.conf (think it was already set up)
    Code: Select all
    LoadModule ssl_module modules/mod_ssl.so
  • Adding the necessary SSL modules to the PHP.ini
    Code: Select all
    extension=php_openssl.dll   
  • disabling errologging
    Code: Select all
    $orig_error_reporting = error_reporting();
       error_reporting(0);
       $this->soap = new SoapClient('https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL');   
       $client = new SoapClient($wsdlUrl, array("trace" => 1, "exceptions" => 1));
       error_reporting($orig_error_reporting);

None of these actions helped, so I installed Wireshark, and it turns out, that no TCP is being sent out, when I try to run the example using
$wsdlUrl = 'https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL';

If someone has any good ideas to solve this problem, please let me know.
-
fsa
 
Posts: 3
Joined: Tue May 19, 2009 9:11 am

Re: Problems using XAMPP with PHP and https

Postby mmo » Thu Jul 09, 2009 10:33 am

Haven't tried using the API myself yet, still waiting for some feedback from support, however was just browsing through the forums and noticed this.

Have you checked the SSL is actually enabled (just because we ask our servers nicely to do something doesn't mean it actually does it)? To me it sounds like your PHP can't find a handler for https streams.

Also reading this:
http://www.webmasterworld.com/php/3764607.htm
Look for the libaey32.dll, might be that?
-
mmo
 
Posts: 1
Joined: Thu Jul 09, 2009 10:24 am


Return to PHP



cron