美国主机Lunarpages

Mediawiki中文技术论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4575|回复: 0

Mediawiki常见安装问题

[复制链接]
发表于 2010-12-23 15:00:54 | 显示全部楼层 |阅读模式
RAKsmart美国服务器
  • 故障现象:登录或创建页面白屏,或者编辑页面时提示:
  1. 来自于函数 "Parser::replaceLinkHolders"。 MySQL返回错误 "1267: Illegal mix of collations (utf8_bin,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘ IN ‘ (localhost)"。
  2. 来自于函数 "Parser::replaceLinkHolders"。 MySQL返回错误 "1271: Illegal mix of collations for operation ‘ IN ‘ (localhost)"。
复制代码



  • 原因:多为windows路径解析错误
  • 处理:在localsettings.php里面找到如下内容,并修改为第一行加#号、第二行取消#号。
  1. $wgArticlePath      = "$wgScript/$1";
  2. # $wgArticlePath      = "$wgScript?title=$1";
复制代码


  • 备注:此方法可能不适用于1.8版 因为在1.8的localsettings.php文件中就是上面修改后的代码 所以问题不一定出在这里,具体解决方法探索中。。。

  • 故障提示:
  1. 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)".
复制代码



  • 原因:汉字utf8编码字节数比英文多造成的bug
  • 处理:找到 maintenance\tables.sql 以及 includes\JobQueue.php,其末尾部分类似于下面,注意里面242数值为修改后的数据。这个好像是命令行的长度,鉴于里面不可能会有很多汉字,可继续减小,直到安装通过
  1. -- Jobs performed by parallel apache threads or a command-line daemon
  2. CREATE TABLE /*$wgDBprefix*/job (
  3.   job_id int(9) unsigned NOT NULL auto_increment,
  4.   
  5.   -- Command name, currently only refreshLinks is defined
  6.   job_cmd varchar(242) NOT NULL default '',1

  7.   -- Namespace and title to act on
  8.   -- Should be 0 and '' if the command does not operate on a title
  9.   job_namespace int NOT NULL,
  10.   job_title varchar(242) binary NOT NULL,

  11.   -- Any other parameters to the command
  12.   -- Presently unused, format undefined
  13.   job_params blob NOT NULL default '',

  14.   PRIMARY KEY job_id (job_id),
  15.   KEY (job_cmd, job_namespace, job_title)
  16. ) TYPE=InnoDB;
复制代码

[编辑]
Mediawiki 1.8.2在中文windows平台安装故障
  • 故障现象:安装1.8.2 版本的在win2000平台 ,http server 为apache 2.2 ,php>5.0 ,mysql>5.0
安装的时候,我选择数据库字符集:选择的是 Experimental MySQL 4.1/5.0 UTF8   

运行安装脚本后,出现以下提示:   
  1. Creating tables... using MySQL 5 table defs...Query "CREATE TABLE `ipblocks` ( ipb_id int(8) NOT NULL auto_increment, ipb_address varchar(40) binary NOT NULL default [i], ipb_user int(8) unsigned NOT NULL default '0', ipb_by int(8) unsigned NOT NULL default '0', ipb_reason tinyblob NOT NULL default [/i], ipb_timestamp char(14) binary NOT NULL default [i], ipb_auto bool NOT NULL default '0', ipb_anon_only bool NOT NULL default 0, ipb_create_account bool NOT NULL default 1, ipb_expiry char(14) binary NOT NULL default [/i], ipb_range_start varchar(32) NOT NULL default [i], ipb_range_end varchar(32) NOT NULL default [/i], PRIMARY KEY ipb_id (ipb_id), UNIQUE INDEX ipb_address (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only), INDEX ipb_user (ipb_user), INDEX ipb_range (ipb_range_start(8), ipb_range_end(8)), INDEX ipb_timestamp (ipb_timestamp), INDEX ipb_expiry (ipb_expiry) ) TYPE=InnoDB, DEFAULT CHARSET=utf8 " failed with error code "Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys (localhost)".   
复制代码

。   
  • 解决
  • 找到 maintenance\mysql5\tables.sql ,在其中搜索" UNIQUE INDEX ipb_address (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only)" ,然后将其中“ipb_address(255)”改为“ipb_address”(删除(255)字样),保存tables.sql。
  • 然后删除刚建立的mediawiki的数据库 ,(不删除 运行安装脚本会出现无法建立数据库的错误)
  • 重新运行安装脚本,注意最后数据库字符集部分要选择 Experimental MySQL 4.1/5.0 UTF8 ,然后就可以通过了。
然后删除刚建立的mediawiki的数据库 ,(不删除 运行安装脚本会出现无法建立数据库的错误)请问这个新建立的数据库在哪里?
我在windows下面安装的时候出现如此的情况,说什么creating tables接着就不动了.什么问题啊!
  1. Creating tables... using MySQL 5 table defs...Query "CREATE TABLE `user` ( user_id int(5) unsigned NOT NULL auto_increment, user_name varchar(255) binary NOT NULL default , user_real_name varchar(255) binary NOT NULL default , user_password tinyblob NOT NULL default , user_newpassword tinyblob NOT NULL default , user_email tinytext NOT NULL default , user_options blob NOT NULL default , user_touched char(14) binary NOT NULL default , user_token char(32) binary NOT NULL default , user_email_authenticated CHAR(14) BINARY, user_email_token CHAR(32) BINARY, user_email_token_expires CHAR(14) BINARY, user_registration CHAR(14) BINARY, PRIMARY KEY user_id (user_id), UNIQUE INDEX user_name (user_name), INDEX (user_email_token) ) TYPE=InnoDB, DEFAULT CHARSET=utf8 " failed with error code "The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it working (localhost)".
复制代码

Creating tables... using MySQL 5 table defs...Query "CREATE TABLE `user` ( user_id int(5) unsigned NOT NULL auto_increment, user_name varchar(255) binary NOT NULL default , user_real_name varchar(255) binary NOT NULL default , user_password tinyblob NOT NULL default , user_newpassword tinyblob NOT NULL default , user_email tinytext NOT NULL default , user_options blob NOT NULL default , user_touched char(14) binary NOT NULL default , user_token char(32) binary NOT NULL default , user_email_authenticated CHAR(14) BINARY, user_email_token CHAR(32) BINARY, user_email_token_expires CHAR(14) BINARY, user_registration CHAR(14) BINARY, PRIMARY KEY user_id (user_id), UNIQUE INDEX user_name (user_name), INDEX (user_email_token) ) TYPE=InnoDB, DEFAULT CHARSET=utf8 " failed with error code "The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it working (localhost)".
  • 解决
尝试一下别选这个: Experimental MySQL 4.1/5.0 UTF8
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

美国HostEase虚拟主机一年198元

Archiver|手机版|小黑屋|Mediawiki中文技术论坛

GMT+8, 2024-4-23 22:14 , Processed in 0.036288 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表