Moving ssl values inside if statement to avoid errors on PHP versions that don't support it.