PHP 5.6 OpenSSL not working -


i trying create api running following error

file_get_contents(): unable find wrapper "https" - did forget enable when configured php?

checking if openssl , wrappers enabled:

openssl: no http wrapper: yes https wrapper: no wrappers: array(6) { [0]=> string(3) "php" [1]=> string(4) "file" [2]=> string(4) "glob" [3]=> string(4) "data" [4]=> string(4) "http" [5]=> string(3) "ftp" } 

tried find nothing works.

php version: 5.6.1 os: sles 12 

if need more info please let me know.

in order enable php_openssl extension did following:

  • installed php-openssl via yast in sles 12
  • added "extension=php_openssl.so" correct php.ini file

looks php_openssl extension either not present on system or not loaded php core.

i'm not sles guy there might php-openssl package (if exists) should able install via

zypper install php-openssl 

(maybe sudo zypper....)

the httpd has restarted if php installed apache module.
after should check whether php_openssl.so loaded core. there should extension=php_openssl.so entry somewhere in 1 of php.ini files (or extension=openssl.so? sorry, maybe else can fill in specifics sles).
<?php phpinfo(); can tell ini file(s) has been used.
there might tool managing php extensions in sles installation. ubuntu you'd use php5enmod.


Comments