Apache server can't talk to external https web service?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache server can't talk to external https web service?

Postby omaroo » 07. May 2015 07:35

Hi all :)

A silly question from a user who isn't well versed in networking - and especially SSL.

I have a XAMPP (1.7.4) server running on a virtual Windows Server that hosts our web application that essentially makes SOAP calls to an external web service owned by our client. While I can fire up a browser on the server via RDP and access https:// sites, the Apache server cannot. I tried running a test php script to determine whether it could see other https sites, and it can't - it returns back null;

<?php
// create curl resource
$ch = curl_init();

// set url
curl_setopt($ch, CURLOPT_URL, "https://thewebsiteinquestion.com");

//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// $output contains the output string
$output = curl_exec($ch);

// close curl resource to free up system resources
curl_close($ch);

echo nl2br(htmlentities($output));
?>


The firewall is open to port 443, both on the server and externally. May I ask if there's a config somewhere that may block this access to https websites by default?

Thanks so much for any advice.

Cheers
Chris - Sydney, Aust
omaroo
 
Posts: 2
Joined: 07. May 2015 07:26
Operating System: Windows Server Enterprise 2007

Re: Apache server can't talk to external https web service?

Postby omaroo » 08. May 2015 00:55

Found it - surprised no-one suggested it?

XAMPP does not include the openssl dll extension within php.ini list - you have to add the following two lines. I'm a little surprised, and didn't suspect that. No worries. All good I think, so thanks.

extension=php_openssl.dll
allow_url_fopen = On
omaroo
 
Posts: 2
Joined: 07. May 2015 07:26
Operating System: Windows Server Enterprise 2007


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 108 guests