Name Suggestions

SQL error on activation of ext - Name Suggestions

SQL error on activation of ext

by andreask » Sun Sep 17, 2017 5:35 pm

Hello,

I am getting an sql error when I try to enable the extension.

Code: Select all

SQL ERROR [ mysql4 ]

Specified key was too long; max key length is 1000 bytes [1071]

SQL

CREATE TABLE phpbb_namesuggestions_events ( event_name varchar(255) DEFAULT '' NOT NULL, input_selector varchar(255) DEFAULT '' NOT NULL, description varchar(255) DEFAULT '' NOT NULL, suggest_users tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, suggest_groups tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (event_name, input_selector) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysql.php
LINE: 191
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1064
CALL: phpbb\db\driver\mysql->sql_query()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 444
CALL: phpbb\db\tools\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 489
CALL: phpbb\db\tools\tools->sql_create_table()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 711
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 658
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 190
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/ext/boardtools/upload/includes/functions/extensions.php
LINE: 333
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/ext/boardtools/upload/acp/upload_module.php
LINE: 173
CALL: boardtools\upload\includes\functions\extensions::enable()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: boardtools\upload\acp\upload_module->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
phpbb ver 3.2.1
ext version 1.0.1
Here is what I am working on right now...
Inactive User Manager for phpBB
Give it a try...
If you would like to buy me a bier ;) for my work I will drink it on a hot summer day and thank you!!!
andreask
Registered User
Posts: 752
Joined: Fri Feb 27, 2009 6:13 pm
Name: Andreas
Contact:

Re: SQL error on activation of ext

by bimbargo » Mon Jan 01, 2018 12:07 pm

It's the same with my board when try to enable the extension. Please, help!

phpBB 3.2.1
Extension version 1.0.1
PHP Version 7.0.14
bimbargo
Registered User
Posts: 34
Joined: Sat Jun 03, 2006 7:48 am
Contact:

Re: SQL error on activation of ext

by Kratas » Fri Feb 16, 2018 8:38 pm

I have the same problem :-(

phpBB 3.2.2
Extension version 1.0.1
PHP Version 5.6.33
Kratas
Registered User
Posts: 10
Joined: Fri Oct 28, 2011 9:43 am
Location: Czech Rep.
Contact:

Re: SQL error on activation of ext

by MarkusWME » Fri Apr 20, 2018 10:54 pm

I have found out that it may be an issue using a 32 bit system or if you use MyISAM instead of InnoDB database engine. So by switching to the InnoDB engine the problem should be solved. I will have a look at it later on so that it will work with MyISAM too.
User avatar
MarkusWME
Registered User
Posts: 49
Joined: Thu Mar 17, 2016 1:04 am
Contact:

Re: SQL error on activation of ext

by typ85q » Fri Jun 01, 2018 7:16 pm

Hi,

as workaround please try this;
backup your database, safety first ;)

open phpmyadmin selsct your database, click on tab SQL and type the following code:

CREATE TABLE forum_namesuggestions_events ( event_name varchar(255) DEFAULT '' NOT NULL, input_selector varchar(255) DEFAULT '' NOT NULL, description varchar(255) DEFAULT '' NOT NULL, suggest_users tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, suggest_groups tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (event_name(75), input_selector(100)) ) CHARACTER SET `utf8` COLLATE `utf8_bin`

and then activate again, it will work.

Tested with:
PHP 7 and phpbb 3.2.2

PS:
always when I create a table like this way, all my tables are MyISAM, because the standard engine was set to MyISAM from my provider and i can not change it, but I converted all my tables to INNODB, please check with your provider if INNODB is supported !

get all MyISAM Tables with the following SQL code:

SET @DATABASE_NAME = 'yourdatabase_name';
SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements
FROM information_schema.tables AS tb
WHERE table_schema = @DATABASE_NAME
AND `ENGINE` = 'MyISAM'
AND `TABLE_TYPE` = 'BASE TABLE'
ORDER BY table_name DESC;

you will get something like this:
ALTER TABLE `forum_namesuggestions_events` ENGINE=...

and then go to tab sql in phpmyadmin and paste:
ALTER TABLE `forum_namesuggestions_events` ENGINE=INNODB;

thas it.
typ85q
Registered User
Posts: 1
Joined: Fri Jun 01, 2018 7:02 pm
Contact:

Re: SQL error on activation of ext

by quimlc » Sat Jun 23, 2018 3:56 pm

I have the same problem:

Code: Select all

Error General
SQL ERROR [ mysqli ]

Specified key was too long; max key length is 1000 bytes [1071]

SQL

CREATE TABLE phpbb_namesuggestions_events ( event_name varchar(255) DEFAULT '' NOT NULL, input_selector varchar(255) DEFAULT '' NOT NULL, description varchar(255) DEFAULT '' NOT NULL, suggest_users tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, suggest_groups tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, enabled tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, PRIMARY KEY (event_name, input_selector) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;
Would be nice if the author of this mod MarkusWME reduce this key to be able to install it in all type of databases or if someone know how to reduce this key in the archives to be able to activate it.
quimlc
Registered User
Posts: 20
Joined: Fri Apr 24, 2015 3:54 pm
Contact:

Re: SQL error on activation of ext

by quimlc » Sat Jun 23, 2018 4:00 pm

MarkusWME wrote:I have found out that it may be an issue using a 32 bit system or if you use MyISAM instead of InnoDB database engine. So by switching to the InnoDB engine the problem should be solved. I will have a look at it later on so that it will work with MyISAM too.
In my case I not have chance to change the database type my domain and hosting is from DonDominio.com that is a good site and this is the only mod which I got that error, so maybe you can reduce the key and remove some not essential parameters to solve the problem ;)
quimlc
Registered User
Posts: 20
Joined: Fri Apr 24, 2015 3:54 pm
Contact: