2

I have two version PHP. PHP 5 and 7 (default version). In PHP 5 I must enable curl ssl. How do I check if CURL SSL works on PHP5? Can I check it with a CLI command?

Thommen
  • 75
  • 6

1 Answers1

1

On the server side, php -i | grep openssl will tell you if SSL is enabled. If you want to test the SSL protocol, just use https:// in a curl request: curl https://your_server_name.

  • But curl request: `curl https://your_server_name` uses the default PHP, in this case 7? – Thommen Jan 09 '20 at 11:50
  • I understand your point, you want to have two co-existent versions of PHP in your web server. Depending on your server config, you can achieve that with virtual hosts (apache) -> https://stackoverflow.com/questions/42696856/running-two-php-versions-on-the-same-server. Following the notation of the mentioned solution, you could SSL in PHP5 with `curl https://site56.local`. – Josep Palet Jan 10 '20 at 14:33