clean-docker / Magento2

Docker Image to Magento 2 local development in Mac, Linux and Windows
https://hub.docker.com/r/rafaelcgstz/magento2/
MIT License
444 stars 251 forks source link

Losing Magento configuration after docker-compose down #65

Open pmsteil opened 6 years ago

pmsteil commented 6 years ago

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 commented 6 years ago

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

underser commented 5 years ago

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