Improve error message if conf.php has wrong permissions #1000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When setting up Jethro, if
conf.phpexists but is not readable by the runtime PHP user, the browser returns a generic 500 error:and in the Apache error log we get this (incorrect) error message:
[Sat Jan 20 16:15:10.546667 2024] [proxy_fcgi:error] [pid 1746389:tid 140317700662848] [remote 100.94.18.157:48972] AH01071: Got error 'PHP message: PHP Fatal error: Jethro configuration file not found. You need to copy conf.php.sample to conf.php and edit it before Jethro can run in /home/jethro/code/2.34.1/app/index.php on line 32'The attached patch to
index.phpimproves error messages so that both the web browser and Apache logs see the message, andconf.phpdoes not exist, the user sees:Jethro configuration file not found. You need to copy /home/jethro/code/2.34.1/app/conf.php.sample to /home/jethro/code/2.34.1/app/conf.php and edit it before Jethro can runconf.phpexists but is not readable, the runtime user is mentioned in the error message:/home/jethro/code/2.34.1/app/conf.php not readable by user www-data.