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

error on install #536

Closed
willymec opened this issue Aug 31, 2018 · 3 comments
Closed

error on install #536

willymec opened this issue Aug 31, 2018 · 3 comments

Comments

@willymec
Copy link

Installer came up and I added all the usual options and after running the install it comes up with this error.

Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes in /home/holyspir/public_html/jethro/include/installer.class.php:110 Stack trace: #0 /home/holyspir/public_html/jethro/include/installer.class.php(110): PDO->query('CREATE TABLE pe...') #1 /home/holyspir/public_html/jethro/include/installer.class.php(33): Installer->initDB() #2 /home/holyspir/public_html/jethro/templates/installer.template.php(15): Installer->printBody() #3 /home/holyspir/public_html/jethro/include/installer.class.php(19): include('/home/holyspir/...') #4 /home/holyspir/public_html/jethro/index.php(51): Installer->run() #5 {main} thrown in /home/holyspir/public_html/jethro/include/installer.class.php on line 110

@tbar0970
Copy link
Owner

tbar0970 commented Sep 3, 2018

This is tricky to dig into without knowing exactly which query is triggering the error.

You could try adding this to your conf.php:

define('STRICT_MODE_FIX', TRUE);

@willymec
Copy link
Author

willymec commented Sep 3, 2018

From A2hosting support

To resolve this, you can try reducing the size of columns. For example, if the encoding that is being used is utf8, then it should be VARCHAR(255). If it is utfmb4, then - 191. Depending on the application settings, you can also try using a different character set (like UTF-8 instead of UTF8MB4), or use a different engine (like MYISAM, which allows more bytes per prefix).--

The error message "1071 Specified key was too long; max key length is 767 bytes" means that application is unable to populate its database. It tries to create a key and hits the limit on the number of bytes allowed for a database prefix. MySQL has a prefix limitation of 767 bytes in InnoDB, and 1000 bytes in MYISAM. To resolve this, you can try reducing the size of columns. For example, if the encoding that is being used is utf8, then it should be VARCHAR(255). If it is utfmb4, then - 191. Depending on the application settings, you can also try using a different character set (like UTF-8 instead of UTF8MB4), or use a different engine (like MYISAM, which allows more bytes per prefix).

The fix was in phpMyAdmin , operations, collation, changed to utf8_unicode_ci instead of UTF8MB4.
Emptied the database and reinstalled.

@tbar0970
Copy link
Owner

tbar0970 commented Sep 4, 2018

Great. Thanks for posting the solution. I suspected it had to be a mysql config issue since it wasn't occurring on other servers.

@tbar0970 tbar0970 closed this as completed Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants