Page 1 of 1

Differences between Windows and Linux case sensitivity

Posted: Thu Mar 09, 2023 10:15 am
by magallo
If like me, while developing on WSL, you received errors regarding a conflicting function name, for example:

Code: Select all

PHP Fatal error:  Cannot redeclare smarty_cms_function_cssMinifier() (
previously declared in
/public_html/mba/assets/plugins/function.cssMinifier.php:14) in 
/public_html/mba/assets/plugins/function.cssminifier.php on line 14'
then this workaround will solve your issue.

When working with both Linux and Windows files and directories, you may need to adjust how case sensitivity is handled.

Standard behavior:
  • Windows file system treats file and directory names as case-insensitive. FOO.txt and foo.txt will be treated as equivalent files.
  • Linux file system treats file and directory names as case-sensitive. FOO.txt and foo.txt will be treated as distinct files.
Inspect current case sensitivity

Code: Select all

fsutil.exe file queryCaseSensitiveInfo <path>
Modify case sensitivity

Code: Select all

fsutil.exe file setCaseSensitiveInfo <path> enable
Full article here: https://learn.microsoft.com/en-us/windo ... ensitivity