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
KangJL
January 17, 2022, 6:56pm
#7
Unfortunately, this is not valid as your website is violating TOS
i deleted the chat thingy
Oxy
January 17, 2022, 11:24pm
#10
rhopkins:
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 :
Admin:
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.
3 Likes
system
Closed
January 24, 2022, 11:24pm
#11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.