-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve DB Installation Check (#1537) #1585
Conversation
@@ -38,6 +38,15 @@ | |||
// => EXIT | |||
} | |||
|
|||
// check for empty db and redirect to installation wizard | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to check for an empty db in every script? Why not check it only in index.php ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because in adm_program/system/common.php
on Line 35 we have already the config.php
loaded and opened the db connection.
// check if installation is necessary | ||
if (is_file('../../adm_my_files/config.php')) { | ||
if (is_file($rootPath . '/adm_my_files/config.php')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the second check here is required to make a difference between normal installation and docker installation.
With a Docker installation, it is possible that a config.php exists, but the database has not yet been initialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Classic installation is still working.
We have problems with the database check from time to time. Currently it is assumed that the database has already been initialized as soon as a config.php exists.
In most cases, the following error occurs:
Therefore, the check should take place directly in the database and, if necessary, redirect to the installation page.
With the new check, the installation in the container can be significantly simplified, as most of the values are already available via the container configuration.
@Fasse: Can you please review the pull request (changes in
adm_program
) and test with a normal installation?