Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Plugin tab error after PHP 5.3.19 upgrade
The plugins tab of one of my sites doesn’t display the plugins anymore. When in ‘debug’ mode these errors are displayed:
Internal error: “Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation ‘strcmp’”
in /home/……/domains/…../public_html/textpattern/lib/txplib_db.php at line 95.@adminErrorHandler()
textpattern/lib/txplib_db.php:95 trigger_error()
textpattern/lib/txplib_db.php:320 safe_query()
textpattern/lib/txplib_db.php:258 startRows()
textpattern/include/txp_plugin.php:67 safe_rows_start()
The site was on 4.4.1 but I upgraded today to 4.5.4
Everything is working ok, plugins, and plugin preferences are working, and new ones can be installed, but stay invisible.
In test mode I get the first error in a popup and this line on the plugins tab:
I’m sorry. I’m afraid I can’t do that. I think plugin is no safe operation at this time.
I disabled the plugins through phpmyadmin, and turned them on one by one, but that did not change anything. Indeed some database entries are latin and some are utf8. I installed rvm_latin1_to_utf8 but that didn’t change anything.
kees
Last edited by kees-b (2012-12-12 14:38:17)
Offline
#2 2012-12-12 19:40:09
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,313
Re: Plugin tab error after PHP 5.3.19 upgrade
Hm, hit me if I’m too wrong but AFAIR this can be a caching issue (updated JS file not loaded). Try to reload the page circumventing cache (or just empty it).
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
I had this on one of the core sites which required some MySQL tomfoolery to fix the collations of the txp_plugins table to all utf8_general. Probably just a case of using ALTER TABLE
to set the collation on all columns (Robert actually fixed it so I didn’t run the commands myself, otherwise I’d be able to advise exactly).
I think one or two of my plugins are guilty of creating tables without an explicit collation set. I believe I’ve patched them all to always set one, but that doesn’t unfortunately help people who have already created the tables and are in the situation where you can’t even see the plugins panel. I apologise if it’s one or more of my plugins causing the problem.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
Bloke wrote:
I had this on one of the core sites which required some MySQL tomfoolery to fix the collations of the txp_plugins table to all utf8_general. Probably just a case of using
ALTER TABLE
to set the collation on all columns (Robert actually fixed it so I didn’t run the commands myself, otherwise I’d be able to advise exactly).
Thanks! Maybe Robert can explain what he did? I don’t feel too proficient in MySQL tomfoolery….
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
Try this:
1. Backup your database
2. Issue this SQL command through phpMyAdmin or any other MySQL client you can get your hands on (replace txp_plugin
with the actual table name in case you use a table prefix):
ALTER TABLE `txp_plugin`
CHANGE COLUMN `code` `code` MEDIUMTEXT NOT NULL COLLATE 'utf8_general_ci' ,
CHANGE COLUMN `code_md5` `code_md5` VARCHAR(32) NOT NULL DEFAULT '' COLLATE 'utf8_general_ci';
HTH.
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
wet wrote:
Try this:
ALTER TABLE `txp_plugin`
CHANGE COLUMN `code` `code` MEDIUMTEXT NOT NULL COLLATE 'utf8_general_ci' ,
CHANGE COLUMN `code_md5` `code_md5` VARCHAR(32) NOT NULL DEFAULT '' COLLATE 'utf8_general_ci';
Hi Robert, you are a SQL tomfoolery genius! My plugin list is back.
Thanks!
-k
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
+1 to Robert’s SQL genius. Had the same problem and this fixed it immediately. Thank you!
Offline
Re: Plugin tab error after PHP 5.3.19 upgrade
Thank you, Robert!
I’m curious, how can this happen? Oh well, at least it’s fixed!
Offline