If you can drop a .env file on a server. You can drop a well formed .ini file instead. I don't see any reason to ever parse a env file as a ini file.
this post was submitted on 26 Apr 2026
1 points (66.7% liked)
Programming
27024 readers
20 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
Also I don't understand why we need to have a .env file in the first place when config file exists and best practice to pass on secret is not with .env file anyway.
TLDR:
You should ~~probably~~ use a proper parser rather than hoping your .env looks enough like an .ini to pass muster.
You can probably use a butter knife instead of a flat screwdriver but just do your job properly.