TheNAF / naflm

NAFLM - NAF League Manager
Other
35 stars 34 forks source link

Install permissions #301

Closed byrnesvictim closed 4 years ago

byrnesvictim commented 4 years ago

If the following MySQL user permissions are selected (and a couple other configurations) the install may not complete, although it will indicate otherwise if you run install.php a second time;

Privilege Set On Set On Set On
ALTER y y y
ALTER ROUTINE n n y
CREATE y y y
CREATE ROUTINE y y y
CREATE TEMPORARY TABLES n n n
CREATE VIEW n n n
DELETE y y y
DROP y y y
EVENT n n n
EXECUTE n n n
INDEX n y y
INSERT y y y
LOCK TABLES n n n
REFERENCES n n n
SELECT y y y
SHOW VIEW n n n
TRIGGER n n n
UPDATE y y y
RESULT 1 2 3

Result

  1. First run of install.php; "Failed - could not apply one more more table indexes", "Failed - could not create MySQL functions/procedures", install.php remains Second run of install.php; "It seems OBBLM is already installed", install.php remains, database appears to be set up correctly, showing welcome blurb.
  2. First run of install.php; "Failed - could not create MySQL functions/procedures", install.php remains Second run of install.php; "It seems OBBLM is already installed", install.php remains, database appears to be set up correctly, showing welcome blurb.
  3. First run; successful pass, install.php renamed, install working

I think the upgrade.php task that runs first time index.php is run after the install.php could be fixing up any errors on the db end. May be worth updating documentation on this one, or even putting a disclaimer on the first page of install.php about what permissions and not trying to fix it.

byrnesvictim commented 4 years ago

Fixed, documentation requires being set to match.