Hi there, I was wondering why the
sleep() function was disabled.
I need to use this function because of a 30 second check to see if an IP is blocked because the only way to check is to refresh the page, but my website contains input boxes because it is a chat system, so if it refreshes then the message would be cleared.
I did also read that post from the admin, “keeping a process alive for no reason”. It isn’t for no reason, it is for protection for my website.
I made my website only save and store 10 messages at once and only store messages with less than 50 characters
Unfortunately, this is not valid as your website is violating TOS
i deleted the chat thingy
was wondering why the
sleep() function was disabled
It isn’t for no reason, it is for protection for my website.
Possible reasons explained in a little more detail :
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.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.