nilsteampassnet / TeamPass

Collaborative Passwords Manager
https://www.teampass.net
1.67k stars 546 forks source link

Issue with Preparing database step on new install #4172

Open e-door-ch opened 6 months ago

e-door-ch commented 6 months ago
### Steps to reproduce 1. Download last version (today) 2. Install it with PHP 8.1 or 8.2 3. Step: Preparing database get frozen (Working on it) ### Expected behaviour Get tables created and move to next step ### Actual behaviour Impossible to finlize fresh install but tables are created on DB ### Server configuration **Operating system**: **Web server:** **Database:** MariaDB **PHP version:** 8.1 or 8.2 **Teampass version:** Last one in master (today) **Teampass configuration file:** **Updated from an older Teampass or fresh install:** PLEASE attach to this issue the file `/includes/config/tp.config.php`. ### Client configuration **Browser:** **Operating system:** ### Logs #### Web server error log ``` Insert your webserver log here mod_fcgid: stderr: PHP Fatal error: Uncaught mysqli_sql_exception: Table 'database.teampass_processes_tasks' doesn't exist in /home/httpd/vhosts/domain.tld/install/install.queries.php:1294, referer: https://domain.tld/install/install.php mod_fcgid: stderr: Stack trace:, referer: https://domain.tld/install/install.php mod_fcgid: stderr: #0 /home/httpd/vhosts/domain.tld/install/install.queries.php(1294): mysqli_query(Object(mysqli), 'ALTER TABLE `te...'), referer: https://domain.tld/install/install.php mod_fcgid: stderr: #1 {main}, referer: https://domain.tld/install/install.php mod_fcgid: stderr: thrown in /home/httpd/vhosts/domain.tld/install/install.queries.php on line 1294, referer: https://domain.tld/install/install.php #### Log from the web-browser developer console (CTRL + SHIFT + i) ``` Insert the log here and especially the answer of the ![capture1](https://github.com/nilsteampassnet/TeamPass/assets/91334617/09885737-b6db-4be5-9686-485ad1bc237f) ![capture2](https://github.com/nilsteampassnet/TeamPass/assets/91334617/ce6f38d6-273c-4361-8bdb-e95211ebb9af) query that failed. ```
nilsteampassnet commented 6 months ago

@e-door-ch Thank you for this report. Indeed, there is one error. In file ./install/install.queries.php Find

                        $mysqli_result = mysqli_query(
                            $dbTmp,
                            'ALTER TABLE `' . $var['tbl_prefix'] . 'processes_tasks`
                                ADD KEY `task_id_idx` (`task_id`);'
                        );

Replace by

                        $mysqli_result = mysqli_query(
                            $dbTmp,
                            'ALTER TABLE `' . $var['tbl_prefix'] . 'background_subtasks`
                                ADD KEY `task_id_idx` (`task_id`);'
                        );