Page MenuHomePhabricator

fails to create table
Closed, InvalidPublic

Description

Author: wisesabre

Description:
on Windows Xp + IIS 5.1
mediawiki doesnt detects MySQL 5.0 instead it uses MySQL 4.0 script for creating
tables.

I manually changed path from config/index.php to mysql5 directory

now I am getting errors like..

Creating tables... using MySQL 4/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 '', user_newpassword tinyblob NOT NULL '',
user_email mediumtext NOT NULL '', user_options blob NOT NULL '', 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
"You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near ''', user_newpassword
tinyblob NOT NULL '', user_email mediumtext NOT NULL '', ' at line 5 (localhost)".

how to fix it?


Version: 1.8.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz7838

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:24 PM
bzimport set Reference to bz7838.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

  • Don't change important scripts and then whine when things break, it's rude
  • If PHP is "finding" MySQL 4.x as opposed to 5.x, then it was built against an

older version of MySQL; on Windows, you'll have to upgrade PHP

robchur wrote:

Please restate the problem, then, in clear and comprehensible English.

That's the MySQL 5 schema being listed in the error message; that'll only work with MySQL 4.1 or higher.
Given the above error, you probably have MySQL 4.0 server.

(Note that that's no the same as having MySQL 5.0 client libraries, or having PHP 5.0)

Resolving INVALID.

robchur wrote:

Brion, your ability to translate from complete gibberish continues to amaze me.

wisesabre wrote:

ok, I'm restating the problem.If you don't understand please say so.

I am trying to install mediawiki at my local PC .I have MySQL server 5.0 +IIS
5.1 + php 5 + win XP (sp2)

mediawiki displays following information while checking environment

Checking environment...

PHP 5.2.0 installed
Found database drivers for: MySQL
PHP server API is cgi-fcgi; using ugly URLs (index.php?title=Page_Title)
Have XML / Latin1-UTF-8 conversion support.
PHP is configured with no memory_limit.
Have zlib support; enabling output compression.
Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions
cannot be used.
GNU diff3 not found.
Couldn't find GD library or ImageMagick; image thumbnailing disabled.
Installation directory: C:\Inetpub\wwwroot\mediawiki
Script URI path: /mediawiki
Environment checked. You can install MediaWiki.

after suppling mediawiki configuration information I get this message

PHP 5.2.0 installed
Found database drivers for: MySQL
PHP server API is cgi-fcgi; using ugly URLs (index.php?title=Page_Title)
Have XML / Latin1-UTF-8 conversion support.
PHP is configured with no memory_limit.
Have zlib support; enabling output compression.
Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions
cannot be used.
GNU diff3 not found.
Couldn't find GD library or ImageMagick; image thumbnailing disabled.
Installation directory: C:\Inetpub\wwwroot\mediawiki
Script URI path: /mediawiki
Environment checked. You can install MediaWiki.
Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider
changing it manually.
Generating configuration file...

Database type: MySQL
Loading class: DatabaseMysql
Attempting to connect to database server as root...success.
Connected to 5.0.27-community-nt
Database wikidb exists
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)".

This problem seems to be a common with windows

->http://meta.wikimedia.org/wiki/Talk:Installing_MediaWiki_on_Windows_Server_2003_SP1#Problem_Creating_table
->http://www.mwusers.com/forums/showthread.php?t=2889

This is a known issue which has been dealt with separately.

As a workaround, turn off "strict mode" in MySQL.