vlucas/dotenv issue

September 2, 2020

I recently spent a couple of hours on the vlucas/dotenv (github here) php package when I thought it would be a quick 10 minute use. I installed it into a new PHP project:

composer require vlucas/phpdotenv

Then, I setup my index.php file the way I normally would. But, then my getenv() php function would not get the values in the .env file. It would return blank. I had other php apps using it that were installed on my local dev environment, so I was stumped. I looked at all kinds of things. I realized that the php super global $_ENV had the values in there even though the getenv() function wasn't getting them.

Long story short, I downgraded to an older version of the package, and then it worked great.

Personal Updates

This is a password protected section available to those who know me in some fashion. If you know me and you do not already have a login, you can request a login here.

Personal Updates
Book Reviews

I am nuts about books. I read on all kinds of topics. I attempt to review each book I read for the sake of my own enrichment as well as conversation starters with others.

My Book Reviews
Pastoral Ministry

God has called me to be a pastor, and occasionally I have some pastoral thoughts I like to share.

Pastoral Posts
The Attic

You never know what you will find in an attic! Usually there is a hodgepodge of things buried under dust.

Explore the Attic
Technology

Most of what is included here are notes to myself. The majority of folks will not find interest in these posts.

Technology Posts