Skip to content
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

FluxCP tries to update tables that should already exists on database #380

Closed
Filipe-Souza opened this issue Dec 23, 2023 · 1 comment · Fixed by #388
Closed

FluxCP tries to update tables that should already exists on database #380

Filipe-Souza opened this issue Dec 23, 2023 · 1 comment · Fixed by #388

Comments

@Filipe-Souza
Copy link

Environment

- PHP: 8.1
- MySQL: 5.7
- Apache 2.4.57 
- Debian 12 (bookworm) (Running on a Docker image)

Current Behavior

When installing the first time, the installer pops up asking to update the database:

screencapture-localhost-2023-12-23-12_58_53

When clicking on "Install or Update Everything" the installation page installs everything is needed according to the config:

Database "r*gn*rok" before the installer run:
db_before_install

Database "r*gn*rok" after the installer run:
db_after_install

FluxCP panel working:

screencapture-localhost-2023-12-23-13_00_22

The problem

If I delete the FluxCP installation files (all the files from the server webroot), clone the repo again and re-run the setup, with the same config directory (from the previous setup), the installer starts asking to setup up again the database, with some tables missing:

Schema name Latest Version Version Installed
cp_itemshop 20090104190020 20080928225124
cp_onlinepeak 20131120120201 None
cp_redeemlog 20081109093448 None
cp_xferlog 20081109093448 None

image

But clicking on "Install or Update Everything" this time will throw errors about duplicated columns (example of the first error):

db_reinstall_error

Expected Behavior

The first install should fill the database with all required tables/columns/data if the installer validation will run every time.

Steps To Reproduce

  1. Clone the FluxCP into the server webroot
  2. Modify the config files as bellow:
    1. config/application.php
      'BaseURI' => '/',
      'RequireOwnership' => false,
    2. config/servers.php
      Input the database credentials and database name only, the rest leave as default
  3. Install the FluxCP normally
  4. Copy the modified configuration files
  5. Delete the FluxCP files from the server webroot
  6. Clone the FluxCP into the server webroot again
  7. Copy the configuration files or input again the required properties
  8. Reach the Install & Update page and click on Install or Update Everything

Anything else?

I'm currently using a Docker container to run the Apache and PHP, but for the purpose of this issue the FluxCP was mounted as a volume inside the container.
The FluxCP installation is configured with 777 for all files and directories.

@Filipe-Souza
Copy link
Author

Possibly related to #111 and #168, but in this one I tried to provide more info about the event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant