Closed dondon2d closed 6 years ago
Hi! Yeah, this library tries not to block the current process. But the LetsEncrypt servers need some time f.e. to generate the certificate, to check the http auth.. Because of this it is currently necessary to run a script multiple times.
Normally that's not a problem, if there is a cronjob.
But you could try to pause the current process by adding:
sleep(30);
This would halt the process for 30 seconds.
Alternativ:
while(true) {
if($order->authorized())
break;
sleep(30);
}
This would retry, until the order is authorized
But keep in mind: It would be possible that the LetsEncrypt servers need much more time, f.e. minutes or hours to finish a specific step. This is not specified.
I resolved it by doing something similar (added a timeout and looped) but I appreciate the answer. Thank you!
Is there any way to wait for the authorization to finish? For new orders the script needs to be ran twice to generate the certificates. Thanks!