contao-manager icon indicating copy to clipboard operation
contao-manager copied to clipboard

Check for a `open_basedir` configuration

Open aschempp opened this issue 5 years ago • 5 comments

@aschempp may be the Contao Manager could check for an open_basedir configuration such as this? There are a few hosters out there that set the open_basedir to the document root by default. And I think Plesk does that by default too.

Originally posted by @fritzmg in https://github.com/contao/contao-manager/issues/594#issuecomment-706511492

aschempp avatar Oct 10 '20 14:10 aschempp

What should be validaten on?

aschempp avatar Oct 10 '20 14:10 aschempp

May be after the Contao Manager determined the installation directory, check it against the current open_basedir configuration and show an error with an explanation.

Plus a link to the performance section in the manual, explaining why this setting should not be used at all.

fritzmg avatar Oct 12 '20 08:10 fritzmg

@fritzmg sorry I can't figure out what was meant here, do you still remember? What would the explanation be about? Be aware that there are no "warnings" in the system check, we can't "recommend" a performance setting (yet).

aschempp avatar Jan 07 '21 10:01 aschempp

It needs to be an error anyway, not a warning. The original issue was about an open_basedir setting, where the path was pointing to the web/ sub folder of the Contao Installation. Some hosters use a variable for the open_basedir setting that represents the DocumentRoot of the vhost - which obviously will not work for applications that use a sub folder as its document root. The idea was to evaluate open_basedir, if set, and check for such a specific misconfiguration.

fritzmg avatar Jan 07 '21 10:01 fritzmg

What would not work? If open_basedir points to foo/bar, I can always create foo/bar/web. And if the folder is /foo/bar/web, then Contao Manager will ask to create /foo/bar/web/example.com/web for you, because it can't write to /foo/bar (due to open_basedir).

aschempp avatar Jan 08 '21 08:01 aschempp