Issue Details (XML | Word | Printable)

Key: MDL-11671
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
Priority: Minor Minor
Assignee: Eloy Lafuente (stronk7)
Reporter: Jason Schmidt
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Character Set misreported on shared hosting

Created: 09/Oct/07 07:22 AM   Updated: 19/Nov/07 01:20 AM
Component/s: Database SQL/XMLDB
Affects Version/s: 1.8.2
Fix Version/s: 1.6.6, 1.7.4, 1.8.4, 1.9, 2.0

Environment: MySQL 5.0, PHP 5.1.6, Linux 2.6.22, Apache 1.3.37, HostMonster shared hosting
Issue Links:
Dependency
 

Database: MySQL
Participants: Eloy Lafuente (stronk7), Jason Schmidt, Petr Škoda (skodak) and Richard L. Enison
Security Level: None
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE


 Description  « Hide
HostMonster's shared hosting MySQL database server does not change the GLOBAL variable for character_set_database relative to the current default database (Moodle's DB), but does change the LOCAL variable.

grep "SHOW VARIABLES LIKE 'character_set_database'" (should return three locations)

Change "SHOW VARIABLES" to "SHOW LOCAL VARIABLES"



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 10/Oct/07 10:17 PM
Well,

I don't understand the GLOBAL / LOCAL (SESSION) distinction for the "character_set_database" setting.

Such setting isn't client/server dependent AFAIK, but the default encoding of the database where Moodle connects to. So, if one DB has 'utf8' as default encoding, the "character_set_database" should return 'utf8', no matter if asked GLOBALLY or LOCALLY.

Or, were am I wrong? How can we have different "character_set_database" settings depending of the GLOBAL/LOCAL thing?

Ciao


Petr Škoda (skodak) added a comment - 10/Oct/07 11:09 PM
Reading the docs and our code I also think we are not setting 'character_set_database' variable at all, we just require moodle database to be using unicode encoding. The easies solution is to drop and recreate the database with utf8 as default charset.

The problem with shared hosting is that everybody is disabling/limiting different "features" in PHP, MySQL or Apache. Majority of testing is done with default settings and default installations.


Richard L. Enison added a comment - 12/Nov/07 04:35 PM
PS,

There is already code in Moodle to perform the "easiest solution" of recreating the db as utf8; it reportedly doesn't work.

EL,

See Anthony Borrow's recent comments on MDL-11743.

RLE


Eloy Lafuente (stronk7) added a comment - 19/Nov/07 01:20 AM
This is closed as duplicate of MDL-11743 (fixed in CVS).

Ciao