helhum / TYPO3-Distribution

A distribution package for TYPO3 CMS with added typo3_console support
81 stars 19 forks source link

Error while trying to read env.yml outside the root path #10

Closed martinhummer closed 7 years ago

martinhummer commented 7 years ago

On my webhost, there is a basedir restriction to my web path. YamlFileReader.php tries to read a file in ../../../shared/Configuration/env.yml If this path is not allowed to access, the following error occurs in the backend:

bildschirmfoto 2017-10-12 um 08 49 25
helhum commented 7 years ago

Thanks for your report.

On my webhost, there is a basedir restriction to my web path

The only solution here is to allow this path in the webserver/ php configuration or to remove this line from the configuration in your project and only include files that are within your open basedir paths

martinhummer commented 7 years ago

Thanks for your reply Helmut!

I reported this because I thought there maybe a possibility to catch this error. But of course I can remove the line from conf/config.yml

Great Distribution by the way, really inspiring!

helhum commented 7 years ago

I reported this because I thought there maybe a possibility to catch this error.

There is, however the only option would be to change file_exists to @file_exists, which would mute the error/exception, but would make finding the error a real pain, in case someone relies on such config file to be included.

Great Distribution by the way, really inspiring!

Good to hear, thanks!