Mediawiki-l,
Hello. I am attempting to install my first MediaWiki. I am very familiar with PHP/MySQL/HTML, but I wouldn't call myself an expert. Please accept my apologies if I have missed something obvious.
I have a home testing environment for my web sites, which is Linux Ubuntu Dapper 6.06, where I am installing the Wiki.
I've encountered a problem which I can not find specific information for in the MediaWiki documentation. The error output of the installation of MediaWiki 1.6.3 is below:
* PHP 4.4.2-1build1 installed * Warning: PHP's register_globals option is enabled. Disable it if you can. MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities. * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title) * Have XML / Latin1-UTF-8 conversion support. * PHP's memory_limit is 8M. If this is too low, installation may fail! Attempting to raise limit to 20M... ok. * Have zlib support; enabling output compression. * Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions * Found GNU diff3: /usr/bin/diff3. * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. * Installation directory: /home/dave/web_sites/gutteridge.info/web * Script URI path: /web_sites/gutteridge.info/web * Environment checked. You can install MediaWiki.
Generating configuration file... * Database type: mysql * Attempting to connect to database server as root...success. * Connected to 4.1.15-Debian_1ubuntu5-log * Created database wikidb * Creating tables... using MySQL 4 table defs...Query "CREATE TABLE `gw_job` ( job_id int(9) unsigned NOT NULL auto_increment, job_cmd varchar(255) NOT NULL default '', job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL default '', PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".
After this, in phpMyAdmin, I can see that the database has been created. Although I am not sure if it is installed in entirety or not.
If I go back to the directory where the MediaWiki is being installed, it prompts me to install MediaWiki before proceeding, indicating that it has not fully installed under its own terms.
I hope this is a simple error and someone can help me out. Please let me know if there is more information I need to provide.
Thank you.
-- Dave M G
On 27/04/06, Dave M G martin@autotelic.com wrote: [snip]
* Creating tables... using MySQL 4 table defs...Query "CREATE TABLE
`gw_job` ( job_id int(9) unsigned NOT NULL auto_increment, job_cmd varchar(255) NOT NULL default '', job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL default '', PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".
This is a known and quite a common problem for those upgrading from 1.5 to 1.6, or those installing 1.6.x under some conditions. Check out http://bugzilla.wikimedia.org/show_bug.cgi?id=1322, for instance; and possible fixes/workarounds/etc.
Rob Church
Rob,
Thank you for responding.
This is a known and quite a common problem for those upgrading from 1.5 to 1.6, or those installing 1.6.x under some conditions. Check out http://bugzilla.wikimedia.org/show_bug.cgi?id=1322, for instance; and possible fixes/workarounds/etc.
While the issue is known, the workarounds are a little above my head. People suggest, for example, to use a shorter key length ((`cl_sortkey`(78)), but I have no idea where to implement that.
Another person says "Changed table definition in CVS HEAD for 1.5; cl_sortkey is now limited to 86 characters". Again, I have no idea how to make this change.
Is there a slightly more verbose description available about how to do these things?
-- Dave M G
MediaWiki-l,
The fixes on the bug report page do not seem to be working for me.
If I understand correctly, the file that needs to be altered is "tables.sql" in the maintenance directory.
Following the suggestions outlined on the bug report page, I have edited the code like so (some comments edited out fore brevity):
CREATE TABLE /*$wgDBprefix*/categorylinks ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(78) character set utf8 collate utf8_bin NOT NULL default '', -- For MySQL 4.1+ with charset set to utf8, the sort key *index* -- needs cut to be smaller than 1024 bytes (at 3 bytes per char). -- To sort properly on the shorter key, this field needs to be -- the same shortness. cl_sortkey varchar(78) character set utf8 collate utf8_bin NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey (cl_to,cl_sortkey(78)), KEY cl_timestamp(cl_to,cl_timestamp) ) TYPE=InnoDB;
However, despite this, I still receive the following error: Please include all of the lines below when reporting installation problems.
* PHP 4.4.2-1build1 installed * Warning: PHP's register_globals option is enabled. Disable it if you can. MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities. * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title) * Have XML / Latin1-UTF-8 conversion support. * PHP's memory_limit is 8M. If this is too low, installation may fail! Attempting to raise limit to 20M... ok. * Have zlib support; enabling output compression. * Neither Turck MMCache nor eAccelerator are installed, can't use object caching functions * Found GNU diff3: /usr/bin/diff3. * Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads. * Installation directory: /home/dave/web_sites/gutteridge.info/web * Script URI path: /web_sites/gutteridge.info/web * Environment checked. You can install MediaWiki.
Generating configuration file... * Database type: mysql * Attempting to connect to database server as root...success. * Connected to 4.1.15-Debian_1ubuntu5-log * Database gutteridge_wiki exists * There are already MediaWiki tables in this database. Checking if updates are needed... * DB user account ok
...hitcounter table already exists. ...querycache table already exists. ...objectcache table already exists. ...categorylinks table already exists. ...logging table already exists. ...validate table already exists. ...user_newtalk table already exists. ...transcache table already exists. ...trackbacks table already exists. ...externallinks table already exists. Creating job table...Query "CREATE TABLE `gw_job` ( job_id int(9) unsigned NOT NULL auto_increment, job_cmd varchar(255) NOT NULL default '', job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL default '', PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".
Have I not implemented the fixes correctly?
Thank you for any advice.
-- Dave M G
Moin,
On Friday 28 April 2006 09:31, Dave M G wrote:
MediaWiki-l,
The fixes on the bug report page do not seem to be working for me.
If I understand correctly, the file that needs to be altered is "tables.sql" in the maintenance directory.
Have you applied the latest patch (where a "(169)" is added around line 924?
That, plus dropping the partly created mediawiki database via phpMyAdmin worked for me on Suse 9.3 and Mediawiki 1.6.3.
Best wishes,
Tels
Tels,
Thank you for replying.
Have you applied the latest patch (where a "(169)" is added around line 924?
I'm sorry, but I don't understand what you mean. I have MediaWiki 1.6.3. Are there patches or upgrades more recent than that?
And what do you mean a "(169)" is added around line 924? If you mean line 924 in the tables.sql file, then this is what is around that area in my tables.sql:
-- Any other parameters to the command -- Presently unused, format undefined job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB;
No mention of a (169) anywhere.
Can someone please explain how to resolve the error in perhaps slightly more newbie-friendly terms?
-- Dave M G
Moin,
On Friday 28 April 2006 15:24, Dave M G wrote:
Tels,
Thank you for replying.
Have you applied the latest patch (where a "(169)" is added around line 924?
I'm sorry, but I don't understand what you mean. I have MediaWiki 1.6.3. Are there patches or upgrades more recent than that?
* 1.63. is the latest. * There was a patch posted in the bug report you (and me :) read. * it revolved around adding "(160)" (not (169), sorry!) to the line.
And what do you mean a "(169)" is added around line 924? If you mean line 924 in the tables.sql file, then this is what is around that area in my tables.sql:
-- Any other parameters to the command -- Presently unused, format undefined job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB;
No mention of a (169) anywhere.
Afterwards this file should read:
-- Jobs performed by parallel apache threads or a command-line daemon CREATE TABLE /*$wgDBprefix*/job ( job_id int(9) unsigned NOT NULL auto_increment,
-- Command name, currently only refreshLinks is defined job_cmd varchar(255) NOT NULL default '',
-- Namespace and title to act on -- Should be 0 and '' if the command does not operate on a title job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL,
-- Any other parameters to the command -- Presently unused, format undefined job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id), KEY (job_cmd(160), job_namespace, job_title) ) TYPE=InnoDB;
In my case, I also replaced the (255) by (160), but I am not sure this is really nec.
Hope this helps, if not, please email me again!
Tels
Tels,
Success! Thank you for your helpful advice.
It would not work until I changed *all* instances in the below section from 255 to 160. But in any case, it now works.
For other's reference, here is the section as it appears in my tables.sql file.
-- Jobs performed by parallel apache threads or a command-line daemon CREATE TABLE /*$wgDBprefix*/job ( job_id int(9) unsigned NOT NULL auto_increment,
-- Command name, currently only refreshLinks is defined job_cmd varchar(160) NOT NULL default '',
-- Namespace and title to act on -- Should be 0 and '' if the command does not operate on a title job_namespace int NOT NULL, job_title varchar(160) binary NOT NULL,
-- Any other parameters to the command -- Presently unused, format undefined job_params blob NOT NULL default '',
PRIMARY KEY job_id (job_id), KEY (job_cmd(160), job_namespace, job_title) ) TYPE=InnoDB;
-- Dave M G
Moin Dave,
On Saturday 29 April 2006 08:29, Dave M G wrote:
Tels,
Success! Thank you for your helpful advice.
Cool :)
It would not work until I changed *all* instances in the below section from 255 to 160. But in any case, it now works.
I had problems with 255 first, so I changed them to 160, too, but then it occured to me that tables.sql might be only loaded when you reload the form to install your wiki, so Itoyed around. In the end I also had everywhere 160, but I could'nt say for sure if this is/was really nec. So good to know it is :)
I am also unsure what the magic 160 number is, or why it works and 255 not. So far my test-wiki at home seems to work just fine. At my server, 255 worked just fine.
Best wishes,
Tels
Moin,
On Thursday 27 April 2006 14:49, Rob Church wrote:
On 27/04/06, Dave M G martin@autotelic.com wrote: [snip]
* Creating tables... using MySQL 4 table defs...Query "CREATE
TABLE `gw_job` ( job_id int(9) unsigned NOT NULL auto_increment, job_cmd varchar(255) NOT NULL default '', job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL default '', PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (localhost)".
This is a known and quite a common problem for those upgrading from 1.5 to 1.6, or those installing 1.6.x under some conditions. Check out http://bugzilla.wikimedia.org/show_bug.cgi?id=1322, for instance; and possible fixes/workarounds/etc.
Btw, this also happened on my SuSE 9.1 system. Thanx for the pointer!
best wishes,
tels
mediawiki-l@lists.wikimedia.org