Page 1 of 1

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

PostPosted: 07. May 2015 07:35
by omaroo
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

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

PostPosted: 08. May 2015 00:55
by omaroo
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