munkireport / munkireport-php

A reporting tool for munki
MIT License
393 stars 138 forks source link

Quotes in .env.example file causes exception #1263

Closed hfike closed 5 years ago

hfike commented 5 years ago

I copied the contents of the .env.example file for use with the instance I am setting up in docker. I am using the sqlite db, and received the following Fatal error:

Fatal error: Uncaught Exception: Unknown driver: "sqlite" in /var/munkireport/app/config/db.php:35 Stack trace: #0 /var/munkireport/app/helpers/config_helper.php(82): require() #1 /var/munkireport/bootstrap/app.php(38): configAppendFile('/var/munkirepor...', 'connection') #2 /var/munkireport/public/index.php(7): require_once('/var/munkirepor...') #3 {main} thrown in /var/munkireport/app/config/db.php on line 35

Changing the line in the .env file from CONNECTION_DRIVER="sqlite" to CONNECTION_DRIVER=sqlite fixed this issue.

I also found in slack where @flammable was having the same issue with the mysql driver: https://macadmins.slack.com/archives/C066NK3K5/p1548005965938100

I would suggest changing the .env.example file to remove those quotes, however, I'm not sure how far beyond the issues with the quote @flammable and I noticed one would need to go to remove this problem.

hfike commented 5 years ago

I'm seeing this same issue on other variables as well as I continue through the setup. Is this an issue related to my environment potentially?

kevinmcox commented 5 years ago

@hfike It might be related to Docker. I have no problem with those quotes in my non-docker setup.

bochoven commented 5 years ago

https://github.com/docker/compose/issues/3702

Sent from my iPhone

On 20 Jul 2019, at 19:18, Kevin M. Cox notifications@github.com wrote:

@hfike It might be related to Docker. I have no problem with those quotes in my non-docker setup.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

flammable commented 5 years ago

Sorry @hfike, I should really update my blog post to cover MunkiReport v4 in Docker (or frankly, the wiki). I had to eliminate all quotes from my env file, since they just don't work with Docker Compose.

hfike commented 5 years ago

I plan on making some notes on the wiki, however, if quote are removed, does this break non-docker usage?

bochoven commented 5 years ago

Leaving out quotes caused some preferences not being parsed correctly. We would need to test if that’s still the case.

Sent from my iPhone

On 22 Jul 2019, at 07:15, Harry Fike notifications@github.com wrote:

I plan on making some notes on the wiki, however, if quote are removed, does this break non-docker usage?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.