phpMyAdmin + Drupal 4.7 issue
We've started using MySQL conditional comments (of the form /*!40100 ... */) with some MySQL 4.1+ specific code (to set the right db table character set). Unfortunately, phpMyAdmin blindly removes all comments when you upload an SQL file like our database.mysql. This means that anyone performing a fresh install, using MySQL 4.1+ and phpMyAdmin will encounter problems with non-ascii characters. In theory the admin should just specify the character set when creating the database. But, most hosts will create databases for you AFAIK, or will do it through a simplified front-end where you can only set the name. I don't really have a good view on the usage of tools like phpMyAdmin. I imagine it's pretty widespread though. I found out about this issue after someone reported Unicode problems today: http://drupal.org/node/56112 So, any ideas on how to address this? Some options: - Tell phpMyAdmin users to create their db in utf-8 encoding (or have it created as such by the host). Will need clear and easy to find docs/instructions. - Provide a separate MySQL 4.0 and 4.1+ database.mysql file instead of one with conditional comments and tell people to use the right one. I submitted a patch to phpMyAdmin(*) to make them parse these constructs correctly, but it doesn't help existing users at all. Steven Wittens (*) Yes, I washed my hands afterwards. Their code stinks.
So, any ideas on how to address this? Some options:
- Tell phpMyAdmin users to create their db in utf-8 encoding (or have it created as such by the host). Will need clear and easy to find docs/instructions.
First this, and then tell the users to utilize a new PHPMyadmin, which fixes the issue (when it becomes available). IMHO Goba
- Tell phpMyAdmin users to create their db in utf-8 encoding (or have it created as such by the host). Will need clear and easy to find docs/instructions.
Would something like this work for every table in database/database.mysql? ) TYPE=MyISAM CHARACTER SET utf8; This would work in mysql command line as well as any PHPMyAdmin. Or is it not enough?
Gabor Hojtsy wrote:
First this, and then tell the users to utilize a new PHPMyadmin, which fixes the issue (when it becomes available). IMHO
Goba
Unfortunately, this is not always an option. Almost all web hosts I know of pre-install PHPMyAdmin on their servers as part of their control panels or what have you (and most are slow to upgrade). So users are kind of stuck with whatever version their web host provides.
Angie Byron wrote:
Gabor Hojtsy wrote:
First this, and then tell the users to utilize a new PHPMyadmin, which fixes the issue (when it becomes available). IMHO
I think shipping multiple mysql schemas is a reasonable approach. We'll have an installer for the next release so this is an interim situation. I'm not worried about maintainence. We could drop one of the schemas in HEAD and just maintain in 4.7 branch (in the unlikely event that we do a DB change later in 4.7).
On Tue, 2006-03-28 at 11:06 -0500, Angie Byron wrote:
Gabor Hojtsy wrote:
First this, and then tell the users to utilize a new PHPMyadmin, which fixes the issue (when it becomes available). IMHO
Goba
Unfortunately, this is not always an option. Almost all web hosts I know of pre-install PHPMyAdmin on their servers as part of their control panels or what have you (and most are slow to upgrade). So users are kind of stuck with whatever version their web host provides.
I say don't use a host unless you get a shell :)... I friggin hate control panels... .darrel.
On 3/28/06, Steven Wittens <steven@acko.net> wrote:
- Provide a separate MySQL 4.0 and 4.1+ database.mysql file instead of one with conditional comments and tell people to use the right one.
Strikes me as the easiest and surest way.
participants (7)
-
Angie Byron -
Darrel O'Pry -
Earl Dunovant -
Gabor Hojtsy -
Khalid B -
Moshe Weitzman -
Steven Wittens