[PHP] Mediawiki 1.8.2 설치 오류 해결 방법

PHP 5.2.0, MySQL 5.0 사양에서 MediaWiki 1.8.2 를 설치하여 사용할 때, 인스톨 도중 Database가 제대로 생성되지 않으면서 오류가 나는 경우가 있습니다.

Creating tables… using MySQL 4 table defs…Query “CREATE TABLE`tw_user` ( user_id int(5) unsigned NOT NULL auto_increment, user_namevarchar(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 NOTNULL default ”, user_options blob NOT NULL default ”, user_touchedchar(14) binary NOT NULL default ”, user_token char(32) binary NOTNULL 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 ” failed with error code “BLOB/TEXT column’user_password’ can’t have a default value (localhost)”

이 경우 저는 소스에서 이와 관련된 코드들을 아래와 같이 변경하여 인스톨 하였더니 제대로 작동되더군요. 관련된 글이 http://www.mediawiki.org/wiki/Project:Support_desk 에 있었는데, 현재는 삭제되었습니다.

I tried to install mw 1.8.2 on apache 2.2.3, php5.2 and mysql 5.0.26. No problem until mediawiki initial setup, as it gave me this response:

   * Creating tables… using MySQL 4 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 ” failed with error code “BLOB/TEXT column ‘user_password’ can’t have a default value (localhost)”

I tried everything to solve it, and at last I found the solution link here. In other words these were the changes to be made:

   * \maintenance\mysql5\tables.sql

tinyblob NOT NULL default -> tinyblob NOT NULL

mediumblob NOT NULL default -> mediumblob NOT NULL

blob NOT NULL default -> blob NOT NULL

mediumtext NOT NULL default -> mediumtext NOT NULL

tinytext NOT NULL default -> mediumtext NOT NULL

fa_description tinyblob default -> fa_description tinyblob

UNIQUE INDEX ipb_address (ipb_address(255), ipb_user, ipb_auto, ipb_anon_only), -> UNIQUE INDEX ipb_address (ipb_address(40), ipb_user, ipb_auto, ipb_anon_only),

   * \maintenance\archives\patch-log_params.sql

log_params blob NOT NULL default ; -> log_params blob NOT NULL;

   * \maintenance\archives\patch-filearchive.sql

fa_description tinyblob default , -> fa_description tinyblob,

   * \maintenance\archives\patch-logging.sql

log_params blob NOT NULL default , -> log_params blob NOT NULL,

It seems like a mediawiki 1.8.2 bug, isn’t it?

Thanks to ThatRickyGuy and taatuut I hope this would be useful to someone.

Chrisp 01:29, 30 October 2006 (UTC)

아래는 변경한 소스입니다. 여하튼 Mediawiki가 제대로 설치되지 않는 분들은 참고하세요. ^^

1256025465.tgz

대화에 참여

댓글 1개

댓글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다