Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Free PHP Web Server with SSL enable

Posted on 2009-07-02
6
Medium Priority
?
496 Views
Last Modified: 2012-05-07
hi,
I need a Free PHP Web Server with SSL enable, because i need to integrate my website with Click2pay.com they have send me testuser and password, but i need to enable SSL before doing anything, right now i am using typo local server. but it is not enough.

Thanks

Narinder Singh
0
Comment
Question by:nasin2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 3

Expert Comment

by:JPM
ID: 24762714
WampServer
0
 
LVL 33

Expert Comment

by:Dave Howe
ID: 24771649
almost any of the apache bundles will do - xampp for example:

http://www.apachefriends.org/en/xampp.html
0
 

Author Comment

by:nasin2
ID: 24802130
hi DaveHowe,

Thanks for the link. i download Xampp Server, it has SSL support too, but when i tried to run a programe, i am having one error as following.
-----------------------------------------------------------------------------------
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://c3-test.wirecard.com:443 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?) in C:\xampp\htdocs\c2p\click2pay_soap2.php on line 31
Error: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? (24)
----------------------------------------------------------------------------------
actually i am tried to test my system wity ClIck2Pay test account.
<?php
$host = "c3-test.wirecard.com";
$port = 443;
$path = "/click2pay/services/walletPayment";
$namespace = "http://implementation.soap.click2pay.wirecard.com";
 
 
 
$poststring = '<?xml version="1.0" encoding="UTF-8"?>
 
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body xmlns:q1="'.$namespace.'">
<q1:walletPayment>
<merchantId xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">0000003158D0C913</merchantId>
<userName xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">test.user@wirecard.com</userName>
<pan xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">561db3750a010099</pan>
<amount xsi:type="xsd:long" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">10000</amount>
<curCode xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">USD</curCode>
<mode xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">AUTHORIZATION</mode>
<overdraw xsi:type="xsd:boolean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">false</overdraw>
<productId xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">312432143</productId>
<ip xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">195.93.245.65</ip>
<referenceId xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<merchantTransId xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">51167246041039531</merchantTransId>
</q1:walletPayment>
</soap:Body>
</soap:Envelope>';
//echo $poststring;
//exit;
$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, 5);
 
// text/xml
if(!$fp){
  //error; tell us
  echo "Error: $errstr ($errno)\n";
}else{
  //send the server request
  fputs($fp, "POST $path HTTP/1.1\r\n");
  fputs($fp, "Host: $host\r\n");
  fputs($fp, "SOAPAction: walletPaymentRequest\r\n");
  fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
  fputs($fp, "Connection: close\r\n");
  fputs($fp,"\r\n");
  fputs($fp, $poststring . "\r\n\r\n");
 
//  echo "<PRE>\n";
//  echo "POST $path HTTP/1.1\r\n";
//  echo "Host: $host\r\n";
//  echo "SOAPAction: walletPaymentRequest\r\n";
//  echo "Content-length: ".strlen($poststring)."\r\n";
//  echo "Connection: close\r\n";
//  echo "</PRE>\n";
 
  // prepare for reading the response
  stream_set_timeout($fp,5);
  // here we save the response body - XML response from WireCard
  $output = "";
  // here we store the HTTP headers
  $headers= "";
  // temp. variable for detecting the end of HTTP headers.
  $is_header = 1;
  while(!feof($fp)) {
    $buffer = fgets($fp, 128);
    // fgets on SSL socket 
    if ($buffer == FALSE) {
    	break;
    }
    if (!$is_header) {
      $output .= $buffer;
    }
    if ($buffer == "\r\n") {
    	$is_header = 0;
    }
    if ($is_header) {
      $headers .= $buffer;
    }
  }
  //close fp - we are done with it
  fclose($fp);
  
  
 echo "<PRE>\n";
 echo htmlentities($headers);
 echo "\n";
 echo htmlentities($output);
 echo "\n";
 echo "</PRE>\n";
}
?>

Open in new window

0
 
LVL 33

Accepted Solution

by:
Dave Howe earned 2000 total points
ID: 24802308
in the xampp install dir should be a "php" directory, and in there should be a "php.ini" file.

check that the line "extension=php_openssl.dll" does not have a semicolon (;) in front of it - if it does, remove that, save the file, and restart apache.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question