Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:09:19+00:00 2026-05-23T15:09:19+00:00

So I’ve just installed XAMPP today, and I noticed that the index.php had a

  • 0

So I’ve just installed XAMPP today, and I noticed that the index.php had a check to see if it was accessed through HTTPS. Before that, I thought that in order to use SSL security, you need a certificate, but I am in doubt now.

At this point (Please do correct me, that is the whole point of this question!), my own research has led me to believe that the Certificate only provides information about the location you are accessing. If no Cert is found, it is up to the client to determine if he/she trusts the connection.

The XAMPP index page contains this check:

<?php
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        $uri = 'https://';
    } else {
        $uri = 'http://';
    }
    $uri .= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/xampp/');
    exit;
?>

Alright, so I access my Localhost through https://localhost, and the Firefox “Do you trust this website?” page appeared (and the question is: Can I trust myself? 😉 ).

After that, I created my own little test.php, with the following code:

<?php
  echo "Hi. \n";
  if(isset($_POST['firstname']) && isset($_POST['lastname']))
  {
   echo "Your Firstname is ".$_POST['firstname']." and your Lastname is ".$_POST['lastname'];
   echo "\r\n\r\n";
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        echo "You are using SSL, arentcha? :)";
    } else {
        echo "Hmm.. No SSL!";
    }

  }

?>

I then created a Delphi application that connects to http://localhost/test.php, and to https://localhost/test.php, aswell as http://jeffijoe.com/test.php and https://jeffijoe.com/test.php with the TIdHTTP control (and for the SSL, I hooked up a TIdSSLIOHandlerSocketOpenSSL to the TIdHTTP‘s IOHandler property.

Here is the code for that:

Var
  Src : TStringlist;
  location: String;
begin


 if RadioButton1.Checked then
 location := 'localhost' else location := 'jeffijoe.com';

 if RadioButton3.Checked then
 Protocol := 'http' else Protocol := 'https';    

  Memo1.Clear;

  Src := TStringlist.Create;
  try
  Src.Add('firstname=Jeff&lastname=Hansen');
  Memo1.Text := IdHTTP1.Post(Protocol+'://'+location+'/test.php',Src);
  finally
    Src.Free;
  end;

end;

Here are the results:

http://localhost/test.php – Expected output

https://localhost/test.php – Expected output (It aknowlegdes I am using HTTPS!)

http://jeffijoe.com/test.php – Expected output

https://jeffijoe.com/test.php – Fail! 404 Not Found!

My jeffijoe.com is hosted on a regular shared hosting account.

So – the questions are: Was the HTTPS to Localhost truly “secure”? And how come the HTTPS connection to the Jeffijoe.com location failed, when it didnt on my Localhost? How about the Certificates? Are they required? Is it possible to set up the secured connection without having to purchase an overpriced certificate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:09:20+00:00Added an answer on May 23, 2026 at 3:09 pm

    The connection is safe from sniffers, ie what goes over the wire is encrypted. But as the certificate is self-signed, there is no guarantee that the other side is really who they pretend to be, that’s exactly the point of certificates: a third party guarantees that the other side has been verified to be who they pretend to be.

    The reason it worked on your local XAMPP box is that it carries a so-called self-signed certificate, and the server infrastructure to manage https communications, both of which are more than probably lacking on your hosted site.

    In the end it depends on what you want to achieve: if the communication just has to be safe from sniffing, self signed certificates work just fine. If you need to prove you are who you pretend to be, you need a certificate issued by a specialized company.

    EDIT: to make this exercise more interesting: the cert system can work both ways, ie the server proves to you that it is genuine, and thanks to a so-called client certificate you can prove to the server you are who you pretend to be. Depending on your use case exploring cllient-side certifcates could be quite useful, but be warned it’s not easy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.