Error displayed if the PHP version is switched to 7.2

Started by Fat Rat, November 28, 2018, 07:36:05 AM

Previous topic - Next topic

Arantor

Nothing.

Output buffering in PHP is for buffering of content before being sent to any of the output APIs, whether that's SAPI or the CLI STDOUT interface. If that setting were honestly relevant, SMF would have *much* bigger problems given its general use of output buffering.

The issue historically is that when writing to a file with fwrite, most of the cache files are within a single filesystem chunk, so one roundtrip to fwrite and that would be enough - but we noticed when the modsettings cache (and it's the only one it ever seems to happen to) got written, if it exceeded 8KB it could truncate even though it 'shouldn't'. That's why I was asking if file_put_contents was on the forbidden list, because being on the forbidden list makes the function appear not defined, and so it could fall into the legacy route where it wouldn't necessarily write all the content, exactly as we see here.

Mind you, I could also imagine it being a data race across threads because modSettings is highly contentious though the exclusive locks acquired while writing should fix that, not to mention that both the legacy and atomic methods both check the amount meant to be written against the amount that is claimed to have been written, and tries to remove the cache file if there is a mismatch.

Something really isn't right here, and it isn't configuration related.

drewactual


Fat Rat

The people (person) at hihosting.co.uk is adamant that this is an SMF error rather than anything to do with their hosting/config. I am not convinces, the only time I have seen these errors is since migrating to hihosting.co.uk. I have no choice but to move hosts again!

Arantor

Did you ask the question I have, regarding file_put_contents being in their restricted list or not?

Fat Rat

Hello, I did ask but didn't get a clear response. However, I them took the plunge and migrated to krystal.co.uk

Advertisement: