This idea is to help the community and prevent their sites from shutting down from resource usage warning
So I had this idea, and I couldn’t see anyone else tried it before so i don’t know where we would even start
so here the scenario
it’s 5am and you get an email saying resource usage warning , 5 mins later your site is suspended for 24 hours because you couldn’t react fast enough.
instead of only having 5 mins (if you’re awake) to respond to the warning email before they shut your site down for 24 hours .
What if an app automaticity copy a version of .htaccess to your FTP for your site which has php_flag off (turns off php on your site)
Maybe use IFTTT ?
or raspberry pie ?
another solution is to limit the php useage with code like below, but infinityFree won’t tell us our limit. because is “confidential” … nor how to restart it after midnight.
I think you’re on to something, but I do have a few comments.
First of all, disabling PHP creates some really big security problems. Say, for example, you disable PHP processing on your WordPress site. If someone now navigates to your site /wp-config.php, they now see the PHP code of the file printed in their browser, which includes your database credentials, encryption keys and other data you definitely shouldn’t share.
And if you have a dynamic site, then disabling PHP effectively takes your entire site down, because even the more static pages would not be rendered anymore. In which case you might as well IP blocklist your entire site. But if your entire site is down, then what do you gain compared to your account being suspended?
Ideally, you would push the site in some kind of cached or statically generated read-only mode. But that’s easier said than done.
Also, please note that while you can restrict some things in individual PHP scripts, the limits we calculate are based on the usage of your entire account. If at 5 AM a spam bot starts to hammer your website, restricting the resource use of individual scripts is not going to do anything to save your site.
Finally, while restricting memory usage in PHP is possible, restricting CPU usage is not possible, and Entry Process and hits usage is largely or completely unrelated to the use of individual scripts.
Rather than the suspendeddomain.org being where you get redirected to when your site is suspended, maybe add the option to choose your own suspended site (Obviously not your website that has been suspended) but maybe like your status page. Either that or a nicer page which actually says ‘This site has been suspended’ because i’m sure people have gone to a suspended website, been redirected to suspendeddomain.org and thought what is this site? (and also because then they get about a thousand pings because their anti-virus software is going mad).