NethServer Version: NS8
Module: Webserver
Hi all,
I’m getting this error while I’m trying to send emails or get contents from other external urls in ssl or https.
2026-01-09 00:02:04 Connection failed. Error #2: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:error:16000069:STORE routines::unregistered schemeerror:80000002:system library::No such file or directoryerror:16000069:STORE routines::unregistered schemeerror:80000002:system library::No such file or directoryerror:16000069:STORE routines::unregistered schemeerror:80000002:system library::No such file or directoryerror:0A000086:SSL routines::certificate verify failed [/var/www/html/9001/wp-includes/PHPMailer/SMTP.php line 422]
How can I solve this? The system give me this link: PHP: OpenSSL changes in PHP 5.6.x - Manual
Thank you in advance
mrmarkuz
(Markus Neuberger)
January 9, 2026, 7:44am
2
Could it be a regression from the last webserver update? Does it work with the previous version?
Does the site have a valid certificate?
PHP 5.6 is quite old.
Could you please explain what exactly you are using here? is it a WP site/plugin?
So I can try to reproduce the issue.
Maybe it helps to change the mail configuration to use the domain name instead of the IP?
1 Like
Hi @mrmarkuz
Also with 1.3.0 doesn’t work.
Yes, both: the site on webserver and the mail server I’m trying to reach.
I’m using WP Mail SMTP and test the mail send, but you can reproduce also with a simple php script with file_get_contents function (after enabling allow fopen). You can try to reach any https site and you get this error.
It’s already with the name.
1 Like
stephdl
(Stéphane de Labrusse)
January 9, 2026, 8:06am
4
configure a lamp module with phpmyadmin
with ns8-lamp I wrote a script to test to send email, do not know if it can help for test or to try to reproduce
1 Like
If you try to run this script:
<?php
echo file_get_contents("https://download.q-i.it/docs/miniwre/latest/en_version.txt");
It should return a version number, but at the moment it return the above error.
stephdl
(Stéphane de Labrusse)
January 9, 2026, 8:56pm
6
tls1.3 is the last tls encryption :-?
1 Like
It’s hosted on other ns8 webserver, but the same problem with ns8 mail module
mrmarkuz
(Markus Neuberger)
January 9, 2026, 9:18pm
8
I think it’s about a wrong openssl config.
Here is an insecure workaround :
<?php
$options=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false
),
);
echo file_get_contents("https://download.q-i.it/docs/miniwre/latest/en_version.txt", false, stream_context_create($options));
?>
The better method would be to configure the right ca cert but I didn’t find it yet.
EDIT:
Maybe related:
I think I could reproduce it.
I guess the nodes FQDN is the same as the mail server hostname.
Setting the nodes FQDN sets an entry in the hosts /etc/hosts:
127.0.1.1 node.domain.tld node
The hosts /etc/hosts is also used in the containers like the apache2-app container of the lamp app. So when the PHPMailer script is executed in the lamp container and it wants to connect to the mail server at node.domain.tld it doesn’t reach it as it connects to 127.0.1.1 which is the lamp container itself a…
1 Like
I’ve found this solution, but with WordPress It doesn’t work:
stream_context_set_default([
'ssl' => [
'cafile' => '/var/www/html/9004/cacert.pem',
'verify_peer' => true,
]
]);
$data = file_get_contents("https://your-url.com");
But I think we need to fix this via .ini file.
stephdl
(Stéphane de Labrusse)
January 10, 2026, 11:21am
10
hum, we use a dockerfile to build our container since we have moved from bitnami, I bet we miss to install the deb that is responsible of the key and known certification authority in debian, need to check
1 Like
stephdl
(Stéphane de Labrusse)
January 10, 2026, 11:26am
11
root@webserver:/var/www/html# php toto.php
Ver. 2.07root@webserver:/var/www/html#
2 Likes
stephdl
(Stéphane de Labrusse)
January 10, 2026, 11:27am
12
podman exec -ti php8.4-fpm bash
apt update
apt install ca-certificates
root@webserver:/var/www/html# php toto.php
Ver. 2.07root@webserver:/var/www/html#
2 Likes
stephdl
(Stéphane de Labrusse)
January 10, 2026, 11:28am
13
it will disapear after any container reboot for now, can you test @federico.ballarini
2 Likes
mrmarkuz
(Markus Neuberger)
January 10, 2026, 11:49am
14
I can confirm that the php script is working after installing ca-certificates in the php container.
2 Likes
Yes! I confirm that also mail send works now!
Thanks a lot @stephdl and @mrmarkuz ! You are special!
2 Likes