Installation

Trouble with Admin Course

Trouble with Admin Course

by Justin Brody -
Number of replies: 2
Hello,
Hopefully this isn't me doing something stupid again. When I log in to the admin course I get the following warning and error:

Warning messages

  • creating table location_addresses with object WeBWorK::DB::Schema::NewSQL::Std=HASH(0x556d3a0) at /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm line 984.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />Use of uninitialized value in join or string at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 814.<br />

Error messages

DBD::mysql::db do failed: Specified key was too long; max key length is 1000 bytes
WeBWorK::Utils::CourseManagement
/opt/webwork/webwork2/lib/WeBWorK/Utils/CourseManagement.pm
985
WeBWorK::DB::Schema::NewSQL::Std::create_table
1



It looks like the error is coming from trying to create the table "location_addresses". I searched the forum and it looked like the previous solution was to upgrade mysql. I'm running the most recent stable version on gentoo though
#mysql -V
mysql Ver 14.14 Distrib 5.1.56, for pc-linux-gnu (x86_64) using readline 5.1

Do I need something newer? Does anyone know how long this key is or how I can find out? (I'm using version WW2.5).

Thanks for any help!

Update: Turn on database_debug and got some extra info; I've attached the relevant part of the apache log.


I'm not sure what to count, but the longest string in the initial INSERT_INTO looks like 32 characters. Is the problem with the

In reply to Justin Brody

Re: Trouble with Admin Course

by Justin Brody -
I think I've tracked this one down too. There's a USE flag in Gentoo that tells it to use Latin1 encoding instead of UTF8. The latter apparently triples the storage for any string. I'll update this post if recompiling mysql fixes things; hopefully it'll save someone some trouble down the road!

In reply to Justin Brody

Re: Trouble with Admin Course

by Justin Brody -
That seems to have helped. In case anyone else runs into it, I dropped the webwork database and recreated it with:
create database webwork default character set latin1;

Then deleted the courses directory, recopied it, changed permissions, and recreated the admin course.