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

Cannot activate plugin #2

Open
extrakun opened this issue Aug 17, 2015 · 7 comments
Open

Cannot activate plugin #2

extrakun opened this issue Aug 17, 2015 · 7 comments

Comments

@extrakun
Copy link

Hi, I am trying out this sample plugin, but it cannot be activated. Using WordPress 4.2.4, and MySQL 5.6.25

The error message is:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_unicode_ci' is not valid for CHARACTER SET 'utf8mb4'' in C:\Users\extrakun\Dropbox\jobboard\wordpress\wp-content\plugins\wordpress-socializr-master\vendor\illuminate\database\Connectors\MySqlConnector.php:38 Stack trace: #0 C:\Users\extrakun\Dropbox\jobboard\wordpress\wp-content\plugins\wordpress-socializr-master\vendor\illuminate\database\Connectors\MySqlConnector.php(38): PDO->prepare('set names 'utf8...') #1 C:\Users\extrakun\Dropbox\jobboard\wordpress\wp-content\plugins\wordpress-socializr-master\vendor\illuminate\database\Connectors\ConnectionFactory.php(59): Illuminate\Database\Connectors\MySqlConnector->connect(Array) #2 C:\Users\extrakun\Dropbox\jobboard\wordpress\wp-content\plugins\wordpress-socializr-master\vendor\illuminate\database\Connectors\ConnectionFactory.php(48): Illuminate\Database\Connectors\ConnectionFactory->createSingleConnection(Array) #3 C:\Users\extrakun\Dropbox\job in C:\Users\extrakun\Dropbox\jobboard\wordpress\wp-content\plugins\wordpress-socializr-master\vendor\illuminate\database\Connectors\MySqlConnector.php on line 38

@alies-dev
Copy link

alies-dev commented Sep 14, 2015

as temporary solution you can change your WP constant DB_CHARSET to :

define('DB_CHARSET', 'utf8mb4');

or

define('DB_CHARSET', 'utf8mb4_unicode_ci');

@fabiangarga
Copy link

I don't think the temporary define on wordpress will fix it, i had the same error.
You have to change HerbertServiceProvider.php that's located on /vendor/getherbert/framework/Herbert/Framework/Providers, there's a line that set the collation, on my version on line 128 you need to change it to utf8mb4_unicdeo_ci or another utf8mb4.

Hope it helps, today i downloaded the framework, hope to learn some stuff.
Cheers

@PrafullaKumarSahu
Copy link

@fabiangarga this does not work for me .

@PrafullaKumarSahu
Copy link

@lptn your solution too does not work for me .

@jebog
Copy link

jebog commented May 9, 2016

Any solution for this issue ?

@jebog
Copy link

jebog commented May 30, 2016

You should set DB_COLLATE in your wp-config to utf8mb4_unicode_ci

@rameshelamathi
Copy link

Here is the solution:

Edit wp-config.php

And set DB_CHARSET and DB_COLLATION like below

define('DB_CHARSET', 'utf8mb4');

define('DB_COLLATE', 'utf8mb4_unicode_ci');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants