This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

bpettis
bpettis

This is the error that the installation process throws:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table sessions add unique sessions_id_unique(id)) Something went wrong during the installation. Please check the log file (install_files/install.log) or see the documentation for more information.

Doing some digging around apparently the latest version of Laravel is not compatible with old mysql/mariadb.

Some people have recommended changing the database.php file to use utf8 and utf8_unicode_cl instead of the original. But every installation process overwrites that file and brings up the same error.

Can anyone advise on how to create a dev site with XAMPP?

Last updated

dan12625
dan12625

I am also experiencing the same issue on my recently updated wamp server.

Apache 2.4.18 PHP 7.03 MySQL 5.6.29

Getting the same error, even after turning of MySQL strict mode and forcing strict mode under the database.php file.

saleh.asadi.work19498
saleh.asadi.work19498

Hi, Same here!

I know that i should put this in boot method of AppServiceProvider but how and where in octobercms!?

Schema::defaultStringLength(191);

Last updated

daniel25991
daniel25991

Hi, Same problem here. But it's the same error on both a local xampp install (latest version with php 7) and on serverpilot.io default app setup with mysql database. When I try the tips that I came accross (change the charset to utf8) don't work at all.

Pls help!

ndcisiv
ndcisiv

Same problem that's been brought up a few times now. As of Laravel 5.4, the default database charset is utf8mb4. You need to have MySQL 5.7.7 or higher to use that. If you are using MariaDB then you need to have version 10.2.2.

saleh.asadi.work19498
saleh.asadi.work19498

I found a way to install october, it's not the best way but it works.

run this command in terminal:

php -r "eval('?>'.file_get_contents('https://octobercms.com/api/installer'));"

this will fetch an instance of octobercms to your working directory. then add below code to boot method of ServiceProvider.php file under three directories:

Schema::defaultStringLength(191);

modules/: 1.backend 2.cms 3.system

now run :

php artisan october:env

php artisan key:generate

fill the env file with your data and at last run php artisan october:up

Last updated

saleh.asadi.work19498
saleh.asadi.work19498

another solution ( not sure this works or not but this is shorter way ): after you got the error message, close the browser. add below code to boot method of ServiceProvider.php file under three directories:

Schema::defaultStringLength(191);

modules/: 1.backend 2.cms 3.system

now run :

php artisan october:env

php artisan key:generate

fill the env file with your data and at last

run php artisan october:up

bpettis
bpettis

saleh.asadi.work19498 said:

I found a way to install october, it's not the best way but it works.

run this command in terminal:

php -r "eval('?>'.file_get_contents('https://octobercms.com/api/installer'));"

this will fetch an instance of octobercms to your working directory. then add below code to boot method of ServiceProvider.php file under three directories:

Schema::defaultStringLength(191);

modules/: 1.backend 2.cms 3.system

now run :

php artisan october:env

php artisan key:generate

fill the env file with your data and at last run php artisan october:up

Thanks will try this. Another way to do is by manually updating Xampp mysql/mariadb version.

IMO steps are annoyingly time costing. Though they aren't going to stop me from using OctoberCMS.

Last updated

bpettis
bpettis

saleh.asadi.work19498 said:

another solution ( not sure this works or not but this is shorter way ): after you got the error message, close the browser. add below code to boot method of ServiceProvider.php file under three directories:

Schema::defaultStringLength(191);

Its giving me a Class 'Backend\schema' not found

When I go to run php artisan october:env. Can you please specify more of doing it this way?

bpettis
bpettis

Apparently it got fixed: Thank you. I was successfully able to install October CMS this afternoon.

// Fix UTF8MB4 support for MariaDB < 10.2 and MySQL < 5.7 if (Config::get('database.connections.mysql.charset') === 'utf8mb4') { Schema::defaultStringLength(191); }

Last updated

saleh.asadi.work19498
saleh.asadi.work19498

bpettis said:

saleh.asadi.work19498 said:

another solution ( not sure this works or not but this is shorter way ): after you got the error message, close the browser. add below code to boot method of ServiceProvider.php file under three directories:

Schema::defaultStringLength(191);

Its giving me a Class 'Backend\schema' not found

When I go to run php artisan october:env. Can you please specify more of doing it this way?

hi, try using this:

use Illuminate\Support\Facades\Schema;

saleh.asadi.work19498
saleh.asadi.work19498

bpettis said:

Apparently it got fixed: Thank you. I was successfully able to install October CMS this afternoon.

// Fix UTF8MB4 support for MariaDB < 10.2 and MySQL < 5.7 if (Config::get('database.connections.mysql.charset') === 'utf8mb4') { Schema::defaultStringLength(191); }

Congratulation ;-) your welcome.

dan12625
dan12625

Updated Wamp to the latest version and can confirm successful install as well.

Seems the installer should check the DB version before hand.

1-13 of 13

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.