whinis / eve-jacknife

An api auditing tool for EVE Online written in php, works with api keys or SSO access tokens.
http://evejackknife.com/
22 stars 12 forks source link

Installation #7

Closed PerMalmberg closed 8 years ago

PerMalmberg commented 8 years ago

The installer get stuck after clicking the "Check" button. The browser console (Chrome) shows some errors. Not sure if they are related or not. headers

I've also tried to manually created the database and granted the user all privileges beforehand, but that doesn't help. Nor does it help to use a user with full access.

Any ideas?

PerMalmberg commented 8 years ago

Also tried with giving full write/read/execute permissions, made no difference.

PerMalmberg commented 8 years ago

I gave up on trying to fix this, so I manually created the configuration and ran the SQL scripts.

I then stumbled on this limitation: https://bugs.php.net/bug.php?id=51386 Changing the tables that uses longtext to mediumtext makes the problem go away, I think it was mapSolarSystems and dmgEffects.

whinis commented 8 years ago

let me attempt to change the way the installer does its calls, it seems like it may not be allowing my ajax request to go through

whinis commented 8 years ago

Alright, I have pushed an updated installer and updated database for you to try, please tell me if you still have problems

PerMalmberg commented 8 years ago

This works better, however at step db=1, it complained about the login, because it didn't find the eve.config.php. Reloading the page worked.

You should also notify the user if the installer doesn't have write permissions (and that that must be removed afterwards)

whinis commented 8 years ago

It should notify you if it can't write eve.config.php but ill add a check on the first page to make it smoother.

Also its odd that it couldn't find eve.config.php, That file should be written on db=1 and it should error if it couldn't write the file

PerMalmberg commented 8 years ago

Well, I'm just saying what I saw.

By the way, dmgEffects and invTypes are using LONGTEXT again, switching back to MEDIUM fixes the issue previously linked.

whinis commented 8 years ago

I can add in another fix for that because otherwise I would need to do another step for database preparation, if you are using the mysqlnd driver its not a problem as it properly returns the size.

PerMalmberg commented 8 years ago

Hm. I might be able to change to another driver, unless it will conflict with AllianceAuth. I've updated my copy of the db so it can wait for now.

PerMalmberg commented 8 years ago

I did a apt-get install php5-mysqlnd, thereby replacing php5-mysql with php5-mysqlnd then set the column types in dmgEffects and invTypes back to LONGTEXTand I'm no longer having any issues. :+1:

whinis commented 8 years ago

I also updated the code that is used to fetch the LONGTEXT columns so that it shouldn't cause a problem on other systems.

PerMalmberg commented 8 years ago

Oh, you did? In which commit was that? I'm curious to see if changing the driver actually helped.

whinis commented 8 years ago

c2ff4d52256e55edd2d5f1aa534a4422f10fa417, it does help though as mysqlnd driver doesn't have the problem listed. mysqlnd will only allocate what is in the field regardless of type.

PerMalmberg commented 8 years ago

Ok, that was after I changed the driver so it means it is verified.

I ran the installer again, worked nicely this time. Well done.

btw, removing Installer.php from the installation directory is a must if you don't want to publish your password so once installed. A solution to force the user to do that if Jackknife refuses to work while it remains.

whinis commented 8 years ago

It shouldn't reveal the password, it should make an install.lock file that limits it to upgrades only and the passwords should be kept in the dark just as if you were running normally. However I could do that as most updates will include a new copy of the installer. Do you have instances of it somehow showing the password ?

PerMalmberg commented 8 years ago

Yep, mine did. That's probably because I only set write permissions for eve.config.php and nothing else. As such I don't have a lock file. It also explains why update.php doesn't consider jackknife to be installed.

Suggestion: At the start of installation, perform check on the files you need write permissions to.

whinis commented 8 years ago

Alright, it should now check that it has write permissions for the install.lock and to eve.config.php before attempting to continue;