0

I need to run a module that need ssl to be enabled. How can I detect if ssl has been enabled?

The module generate a form through a javascript call.

I am using php.

I have no access to ssl.

Thanks a lot!

John
  • 41
  • 2
  • 2
  • 6

1 Answers1

15

use the extension loaded check!

http://php.net/manual/en/function.extension-loaded.php

 if(!extension_loaded('openssl'))
    {
        throw new Exception('This app needs the Open SSL PHP extension.');
    }

try it ;)

Acelasi Eu
  • 914
  • 2
  • 9
  • 30
  • Hi, thanks a lot, it seem I have ssl enabled with this, but if i see some javascript console, in firebug for example, it still throw some warning about ssl not enabled. what can it be? thanks a lot – John Feb 18 '14 at 17:27
  • You should post another question for this:) ..Also, make sure you select the answer if it answers your question! – Acelasi Eu Feb 19 '14 at 07:10
  • This question is 4 years old, but this answer should have been marked as the accepted answer. Maybe @John will fix it ;) – Daniel Böttner Mar 12 '18 at 12:38