Yes, it executed and output the same content the the "cronjob" test did. So, that confirms that the shell is being executed.
So, next I uninstalled the current certificate, and restored the previous one, before proceeding with the following code change in your PHP script ...
$output = `uapi SSL install_ssl domain=$domain cert=$cert key=$key --output=json > output.txt`;
... and the resulting content of the "output.txt" file was as follows (after "beautifying" it) ...
{
"apiversion": 3,
"module": "SSL",
"func": "install_ssl",
"result": {
"status": 1,
"messages": [
"The certificate was successfully installed on the domain “cdn.fmic.photo”."
],
"metadata": {},
"data": {
"servername": "cdn.fmic.photo",
"message": "The SSL certificate is now installed onto the domain “cdn.fmic.photo” using the IP address “185.118.112.143”.\nThe existing virtual host was updated with the new certificate. Apache is restarting in the background.\n",
"cert_id": "cdn_fmic_photo_e3e49_6d967_1751377803_bde3611e8c87eb5368a24b03512f42f2",
"action": "update",
"warning_domains": [],
"key_id": "e3e49_6d967_f5f802757e874433b6799b867d1be909",
"domain": "cdn.fmic.photo",
"ip": "185.118.112.143",
"statusmsg": "The SSL certificate is now installed onto the domain “cdn.fmic.photo” using the IP address “185.118.112.143”.\nThe existing virtual host was updated with the new certificate. Apache is restarting in the background.\n",
"status": 1,
"html": "<br>The SSL certificate is now installed onto the domain “cdn.fmic.photo” using the IP address “185.118.112.143”.\n<br />\nThe existing virtual host was updated with the new certificate.<br />Apache is restarting in the background.",
"aliases": "",
"extra_certificate_domains": [
"www.cdn.fmic.photo"
],
"user": "fmicweb1",
"working_domains": [
"cdn.fmic.photo"
]
},
"errors": [
"The event UAPI::SSL::install_ssl was handled successfully."
],
"warnings": null
}
}
This means that it is installing the certificate, but somehow the output is not being send back to the PHP script (at least that is my understanding), as it is still reporting the error: uapi SSL install_ssl failed
Do you perhaps have some idea of what may be causing the issue as initially reported?