I don't know when it happened but I guess something around year ago after changing server from centos 7 to alma linux 8... I have something like that in my script PHP (I'm using that to connect with API https://files.directadmin.com/services/all/httpsocket/httpsocket.php )
And I don't know why but after instructions in /* ADD DOMAIN */ there's an error in browser like "Lost connection, try again" - after click "Try again" it asks if I want to send Form (POST) again, I click yes... and it shows that DOMAIN EXISTS (so it looks like it created domain even if browser showed error) and just creating let's encrypt.
I don't know why it's going like that? Can you look at it @smtalk ?
I noticed that if I restart Directadmin (service) it works normally without that error in browser... after few minutes (or hours?) there's again always error...
PHP:
$da = new HTTPSocket;
/* ADD DOMAIN */
$da->connect($server, $server_port);
$da->set_login($da_login, $da_pass);
$da->set_method('post');
$da->query('/CMD_API_DOMAIN', array('action' => 'create', 'domain' => $domain, 'ubandwidth' => 'unlimited', 'uquota' => 'unlimited', 'ssl' => 'ON', 'cgi' => 'ON', 'php' => 'ON'));
$result = $da->fetch_body();
/* ADD SSL CERTIFICATE */
$da->set_method('post');
$da->query('/CMD_API_SSL', array('action' => 'save', 'domain' => $domain, 'type' => 'create', 'request' => 'letsencrypt', 'name' => 'www.' . $domain, 'email' => '[email protected]', 'keysize' => '4096', 'encryption' => 'sha256', 'le_select0' => $domain, 'le_select1' => 'www.' . $domain, 'submit' => 'save'));
$result = $da->fetch_body();
I don't know why it's going like that? Can you look at it @smtalk ?
I noticed that if I restart Directadmin (service) it works normally without that error in browser... after few minutes (or hours?) there's again always error...