I think I understand the reason why you want this.
Unfortunately, I don’t think this is a use case we can make any changes for. Please remember: we provide a website hosting service. A script called through cron to backup a server hosted elsewhere is not exactly a website, and is not a use case we intend to accommodate.
If you add a PHP function to the disable_functions
parameter, PHP will say the function was disabled for “security reasons”, regardless of the motivation of the system maintainer.
In this particular case, I would assume the reason sleep()
is disabled is because it keeps PHP scripts active, without being counted against the script execution time limit. So for the duration of the sleep()
call (which could be VERY long), the PHP process has to be kept alive, it’s memory has to be kept in system memory, it’s connections have to be tracked and so on. An opportunistic hacker could abuse the sleep()
call to overload the server with active scripts in a way which shares some similarities with a TCP SYN flood.
This is speculation though. iFastNet disabled the function, we didn’t, but we can assume that they did this for a good reason.
I know, I also have trouble writing good code if I don’t get enough sleep. But I don’t see how the sleep()
function in PHP is going to help me with that.
That said, doesn’t Scaleway have a Backups feature which can create backups of your server on a schedule? And a way to convert backups to snapshots? It’s been a while since I’ve used Scaleway, so I don’t know.