When running XAMPP (or the webserver) in Windows and access the webfiles from within WSL2/Ubuntu, PHP failes for functions like is_readable() and is_writable().
To fix this a define("WINDOWS2WSL") is introduced, default unset, to ignore the troublesome parts in the code where PHP currently fail.
It is uncertain if it is a fault in PHP, or it it is related to how Windows integrate with WSL2.
The same issue was detected when using PDO with the SQLite database in the same setup. At that time it was most likely the locking before writing to the database, that failed.