Magento2 icon indicating copy to clipboard operation
Magento2 copied to clipboard

Losing Magento configuration after docker-compose down

Open pmsteil opened this issue 6 years ago • 2 comments

Hello, this may just be a newbie question - been messing with this for 3 days.

I can get Magento 2 up and running with this package on my MacOS running High Sierra v10.13.6, but then after a while, or after I ./stop and ./start the docker instances, something goes wrong with my Magento configuration and I end up with these errors on the screen (and nothing else):

`Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required '/app/magento-vars.php' (include_path='.:/usr/local/lib/php') in Unknown on line 0`

I have even tried using docker commit in another terminal window, but then when I stop and start or docker-compose down and up the same thing happens. HELP! :)

patrick

pmsteil avatar Aug 26 '18 20:08 pmsteil

I had someone help me with this issue. What we did to fix this was to comment out this line in the /php.ini file of the magento install we were using:

;auto_prepend_file = /app/magento-vars.php

Just FYI for anyone facing this issue

pmsteil avatar Aug 28 '18 17:08 pmsteil

You can just copy magento-vars.php to /app directory, or correct that line in /php.ini

underser avatar Nov 13 '18 11:11 underser