Ubuntu – PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20151012/php_openssl.dll’

MySQLopensslphp7ssl

I have ubuntu 14.04., php 7 and nginx.

I want to use mysql ssl so I have enabled by removing ";" in front of extension=php_openssl.dll in

/etc/php/7.0/fpm/php.ini 
/etc/php/7.0/cli/php.ini

Restarted php and nginx services.
Now I'm getting error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_openssl.dll' - /usr/lib/php/20151012/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

File "/usr/lib/php/20151012/php_openssl.dll" really does not exist.

Php script with which I'm trying to connect on mysql ssl:

$con=mysqli_init();
if (!$con){
    die("mysqli_init failed");
}

mysqli_ssl_set($con, "/var/www/certs/client-key.pem","/var/www/certs/client-cert.pem","/var/www/certs/ca-cert.pem",NULL, null);

if (!mysqli_real_connect(
    $con,"localhost","user", 'password',"db", 3306)){
    die("Connect Error: " . mysqli_connect_error());
}
mysqli_close($con);

Permissions on all cert files are ok, tried wit 644, 664, 777.

Tried to execute script over browser and over console.

Where I can find missing package?

Thank you

UPDATE 1:
If I comment back "extension=php_openssl.dll" in php.ini files then I get another error:

PHP Warning:  mysqli_real_connect(): this stream does not support SSL/crypto in /var/www/tmp.php on line 70

phpinfo:
enter image description here

Best Answer

Dynamic link libraries (DLLs) are a Windows-specific technology and don't work on Ubuntu. Because PHP can be run on different operating systems, its configuration files contain examples for how to configure it on different operating systems:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; ... or with a path:
;
;   extension=/path/to/extension/msql.so

Normally, the Linux build of PHP already comes with SSL support built in, in contrast to the Windows build, where you need the DLL you mentioned. But you seem to use a third-party build of PHP 7 (maybe a from PPA?), because Ubuntu 14.04 comes with PHP 5 by default. So this third-party build might handle SSL differently.