Has anyone had issues with Craft parsing a .env on Windows Server? Dotenv is throwing an exception (FileException - invalid name) when parsing the first line of my .env, which is just a comment. I can remove that line and then i complains about the next line.
My .env simple starts with:
# The environment Craft is currently running in (dev, staging, production, etc.)
ENVIRONMENT=dev
basically, Dotenv/Parser/isValidName's Regex call is failing.
Full Stack...
Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file due to an invalid name. Failed at [ENVIRONMENT]. in C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php:74
Stack trace:
#0 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php(30): Dotenv\Parser::parseName()
#1 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(169): Dotenv\Parser::parse()
#2 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(107): Dotenv\Loader->processEntries()
#3 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Loader.php(91): Dotenv\Loader->loadDirect()
#4 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Dotenv.php(123): Dotenv\Loader->load()
#5 C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Dotenv.php(80): Dotenv\Dotenv->loadData()
#6 in C:\WebRoot\WebApplications\advantage-rebate-portal-v4.0\vendor\vlucas\phpdotenv\src\Parser.php on line 74