Free PHP Web Server with SSL enable

Posted on 2009-07-02
Last Modified: 2012-05-07
I need a Free PHP Web Server with SSL enable, because i need to integrate my website with 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.


Narinder Singh
Question by:nasin2
  • 2

Expert Comment

Comment Utility
LVL 33

Expert Comment

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

Author Comment

Comment Utility
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:// (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.

$host = "";

$port = 443;

$path = "/click2pay/services/walletPayment";

$namespace = "";

$poststring = '<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="" soap:encodingStyle="" xmlns:xsd="">

<soap:Body xmlns:q1="'.$namespace.'">


<merchantId xsi:type="xsd:string" xmlns:xsi="">0000003158D0C913</merchantId>

<userName xsi:type="xsd:string" xmlns:xsi=""></userName>

<pan xsi:type="xsd:string" xmlns:xsi="">561db3750a010099</pan>

<amount xsi:type="xsd:long" xmlns:xsi="">10000</amount>

<curCode xsi:type="xsd:string" xmlns:xsi="">USD</curCode>

<mode xsi:type="xsd:string" xmlns:xsi="">AUTHORIZATION</mode>

<overdraw xsi:type="xsd:boolean" xmlns:xsi="">false</overdraw>

<productId xsi:type="xsd:string" xmlns:xsi="">312432143</productId>

<ip xsi:type="xsd:string" xmlns:xsi=""></ip>

<referenceId xsi:type="xsd:string" xmlns:xsi=""/>

<merchantTransId xsi:type="xsd:string" xmlns:xsi="">51167246041039531</merchantTransId>




//echo $poststring;


$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, 5);

// text/xml


  //error; tell us

  echo "Error: $errstr ($errno)\n";


  //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, $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


  // 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) {



    if (!$is_header) {

      $output .= $buffer;


    if ($buffer == "\r\n") {

    	$is_header = 0;


    if ($is_header) {

      $headers .= $buffer;



  //close fp - we are done with it




 echo "<PRE>\n";

 echo htmlentities($headers);

 echo "\n";

 echo htmlentities($output);

 echo "\n";

 echo "</PRE>\n";



Open in new window

LVL 33

Accepted Solution

Dave Howe earned 500 total points
Comment Utility
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.

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now