Project:Support desk/Archives/Database/001

= 2008 =

(RESOLVED) Wiki Encoding Problem

 * MediaWiki: 1.11.0
 * PHP: 5.2.3 (cgi-fcgi)
 * MySQL: 5.0.37-community-nt
 * URL: http://wiki.myelectrical.com/

I have had a wiki up and running for a year or so without problems. Recently I have just moved to Dubai and when I first tried the wiki here I received the following error (on some pages only):

''Content Encoding Error (content_encoding_error) Server response could not be decoded using encoding type returned by server. This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently. For assistance, contact your network support team.''

The wiki was fully functional before I arrived in Dubai (and may still be in other countries). After further investigation I found that the wiki is functional except for certain pages:


 * http://wiki.myelectrical.com
 * http://wiki.myelectrical.com/index.php
 * http://wiki.myelectrical.com/index.php?title=Special:Random
 * http://wiki.myelectrical.com/index.php?search=iec
 * etc.

Example working pages are:
 * http://wiki.myelectrical.com/index.php?title=Main_Page
 * http://wiki.myelectrical.com/index.php?title=Special:Recentchanges
 * http://wiki.myelectrical.com/index.php?title=CT_Dimensioning

... most article pages seem to be working

http://wiki.myelectrical.com/index.php?xx (where xx can be a lot of things)

etc.

I've tried quite a lot of things to resolve this without success. Any suggestions/help would be much appreciated.

—62.140.211.130 06:55, 6 February 2008 (UTC)


 * The non-working pages are now working. -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  21:09, 27 February 2008 (UTC)

Peter, the pages are only working in some countries (for example I know they are working in the US). I'm here in the UAE and they are still not working. It appears to be pages that redirect to other pages that do not work (wiki.myelectrical.com and special:random for example). Other mediawiki sites work here in the UAE and I have used the same notebook here and in the US (so firewalls/IE settings would not appear the be the problem).


 * Huh... didn't get that part ok. First of all could you sign your posts with ? My geography knowledge is... well... horrible, so does where ever you are use Latin characters in their language? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  21:07, 28 February 2008 (UTC)

Peter, I'm quite new here in the UAE and I'm not sure if they use Latin or not. If you know of some testing I could carry out to see if things are affected by this please let me know., Steven  62.140.211.130 05:03, 3 March 2008 (UTC)


 * UAE? -PatPeter, [[Image:Tournesol.png|20px]] MediaWiki Support Team  04:43, 6 March 2008 (UTC)

UAE - United Arab Emirates. Anyhow for some strange reason things started working today. I've marked the issue as resolved and will remove the resolve if it happens again. 62.140.211.130

(OUTDATED) Long String of Numbers after moving Wiki

 * MediaWiki: (Reported by your Wiki's Special:Version page)
 * PHP:
 * MySQL:
 * URL:

My company has an internal wiki which we use for internal standardization. We just recently moved the wiki from one box to a newer more up to date box. I did a SQL Dump of the database, recreated the username with all the permssions, copied the Wiki directory to the new box, everything seemed to go smoothly but then when I opened the main page in the content area there is a long string of number of letters. This is on every page. I have no idea where to trouble shoot on this. Any help would be greatly appreciated.

Steve,  mailto:sbarbera@newportharbor.com —24.249.29.209 14:33, 26 February 2008 (UTC)


 * You should post those strange string right here, maybe someone knows what it means ... letters or numbers or both??
 * And don't forget to complete those version lines above. --Detlef Lindenthal 20:40, 26 February 2008 (UTC)

(RESOLVED) Lost sysop access
OH CRAP!!!!! I was trying to figure out how to turn on uploads (still haven't figured that one out yet: documentation is not easily found on this site) and I accidentally killed my bureaucrat privileges on the Userrights Page. Poof! How do I restore them???? No one else is a Bureaucrat and I can't find anything on this site to help me fix this.
 * MediaWiki: 1.10.1
 * PHP: 5.1.4
 * MySQL: 4.1.22
 * URL: I'm too embarrassed to release this!

I'm just starting to learn the ins and now especially the outs of PHP and SQL...is there a way of fixing this in MySQL? or in one of the myriad of PHP files?

Thanks! —Keng 23:45, 10 March 2008 (UTC)
 * You'll need to update the database directly with the following query. First login and go to Special:Preferences to get your user id number (I've used 999 in the example below, so replace that with your own user id), then shell in to your server or do a query with whatever means you have of accessing your database. Also note that if you're using a table prefix you'll need to prepend that to the user_groups table name.

INSERT INTO user_groups (ug_user,ug_group) VALUES(999,'sysop');
 * --Nad 02:18, 13 March 2008 (UTC)
 * Also regarding uploads, you need to set $wgEnableUploads to true in your LocalSettings.php. There are also a number of other settings relating to uploads, see Category:Upload variables. --Nad 02:27, 13 March 2008 (UTC)

(RESOLVED) Rename user using SQL

 * MediaWiki: 1.7.1
 * PHP: 5.2.0-8+etch10 (apache2handler)
 * MySQL: 5.0.32-Debian_7etch5-log
 * URL: RISE

I renamed a user using the SQL instructions in MediaWiki FAQ (See But can I rename the user, then?). But MySQL complains: ERROR 1146 (42S02) at line 3: Table 'mediawiki.cur' doesn't exist (mediawiki is the name of the database). Kindly help.

—203.199.213.130 09:37, 13 March 2008 (UTC)
 * Why not use Extension:Renameuser? Aaron 11:51, 28 March 2008 (UTC)

(OUTDATED) Promote user MySQL statement update
For MediaWiki version 1.9.3 the mysql command to promote a user to a sysop is incorrect. INSERT INTO user_group SET ug_id = youruserid, ug_group = "sysop" the table is now 'user_groups' and the ug_id field has changed to ug_user, hence the correct command would be: INSERT INTO user_groups SET ug_user = , ug_group = "sysop"

Also, you would probably want to do a select user_id, user_name from user; first, so you can find the correct user_id value
 * Thanks! Interestingly enough, that SQL must have been wrong since the beginning, because I don't see any changes that were done to that table... Titoxd (?!?) 04:40, 17 March 2007 (UTC)

(RESOLVED) Reading passwords of users

 * MediaWiki: 1.12.0
 * PHP: 5
 * MySQL: 4.1
 * URL: www.wikilh.tk

Hi. I have question. How I can read the password of my users? I dont want to change them, but i need to read them. I need fast answer. Thank you.

drake

—83.26.71.3 20:21, 23 March 2008 (UTC)
 * You can't. —Emufarmers(T 21:54, 23 March 2008 (UTC)
 * I don't know the answer, but I must assume that since they are stored somewhere in the database, there must be some way to read them, even if it requires some decryption. Smaug 00:33, 24 March 2008 (UTC)
 * MediaWiki salts its MD5-hashed passwords, which, as far as I know, makes decryption impractical, if not impossible.


 * The only sort of counsel that I'll offer is that this is not ethical, and you're wasting your time anyway. —Emufarmers(T 05:49, 24 March 2008 (UTC)

(RESOLVED) Delete history
Hello! Is there a way to delete the history of an article in my wiki? So often I change an article so longer will be the list of the versions. Isn't it space on my disc, if there are so many versions to an article in my wiki? So I want to delete the history time to time, but how? Thank you for your replies, Doc Taxon 17:22, 27 March 2008 (UTC)
 * Are you using compression? Aaron 11:50, 28 March 2008 (UTC)
 * I do not know, whether I am using compression. How can I find out? Doc Taxon 15:01, 28 March 2008 (UTC)

There are php scripts you can use to delete the whole history of old revisions for the entire database. Log in as root and follow these steps: 1) Change into your mediawiki directory on your server.  2) Now you can see a directory named "maintenance". Change into this directory. 3) use the command : php deleteOldRevisions.php --delete  4) If it works, you're done. There is only one version of every page left now. If it does not work, you have not specified the necessary database access in the file AdminSettings.php If you don't even have this file, make a copy of AdminSettings.sample and change admin name and password. Go back to 3)

(RESOLVED) "DB connection error" when trying to run the maintenance script "rebuildall.php" (using PostgreSQL)

 * MediaWiki: 1.12.0
 * PHP: 5.2.0-8+etch11 (apache2handler)
 * PostgreSQL: PostgreSQL 8.1.11 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
 * URL: david.theparticulars.org/wiki/

I used the mediawiki for e few weeks right now and everything worked okay. Now I wanted to try to use a maintenance script for the first time - so I insertet into the AdminSettings.php the same username and password for the PostgreSQL-Server as in the LocalSettings.php. With exactly this username and password, I can log in on the PostgreSQL-Server from the shell (using the command-line tool psql...). But when I run the script rebuildall.php, it keeps saying: "DB connection error: Access denied for user '(...)'@'localhost' (using password: YES) (localhost)". Even with a newly created superuser for PostgreSQL, with which I can log in from the shell and who's data I inserted into the AdminSettings.php, it does not work. Do you have any suggestions? Thanks you.

—Shape 13:02, 28 May 2008 (UTC)


 * I have updatet to a newer Verion from svn - this error doesn't occur no more. --Shape 21:35, 3 June 2008 (UTC)

(RESOLVED) Can't get past the "Could not find a suitable database driver!" message.

 * MediaWiki: (Reported by your Wiki's MediaWiki 1.12.0 Installation page)
 * PHP: 5.2.6
 * MySQL: 5.0
 * URL: http://localhost/mediawiki-1.12.0/config/index.php

This is what I get - it's our old facourite:
 * PHP 5.2.6 installed Could not find a suitable database driver!
 * For MySQL, compile PHP using --with-mysql, or install the mysql.so module
 * For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so module

Bear with me, I'm a newbie at wiki work.

I'm trying to install MediaWiki onto a Vista PC. (I know I ought to be using Linux but there have been problems - another long story.)

I installed MySQL some time ago into C:\Program Files\MySQL\MySQL Server 5.0 and I have been using it fairly successfully with Java apps developed in Eclipse, so I'm fairly sure that's all right. Yes, it is configured as "root" and uses port 3306, as it should.

I had bad experiences with various Wamp packages, mainly because there were problems with the MySQL installation. XAMPP was worst. So I decided to go with the manual downloads.

Apache 2.2.9 is installed in C:\Program Files\Apache Software Foundation\Apache2.2 and configured to work on port 80.

PHP is installed in C:\PHP\php-5.2.6-Win32 and it has been configured as per the instructions.

I have ensured that all DLLs are in the \ext directory of the PHP installation.

I have added ";C:\PHP\php-5.2.6-Win32" to my path file and made sure it occurs BEFORE the one for MySQL (I'm up to speed on environment variables, I use this technique all the time in the day job). The point about it being before the MySQL entry is in response to something I read on another help page.

I have made sure that the php_mysql.dll and php_mysqli.dll entries are uncommented out of the php.ini file so as to enable them.

I have made sure that the line extension_dir="C:\PHP\php-5.6.2-Win32\ext" is in the php.ini file.

I have copied the libmysql.dll, php_mysql.dll and php_mysqli.dll files have been copied into the Apache2.2\bin directory (again in response to a comment on a help forum).

PHP works, I've tested that. Apache works (eventually), I tested that. (If they didn't I wouldn't have got this far.)

I've scoured all the help forums I can find and applied all the solutions I've been offered, but I still get the pesky page:

MediaWiki 1.12.0 Installation

Don't forget security updates! Keep an eye on the low-traffic release announcements mailing list.

Checking environment...

Please include all of the lines below when reporting installation problems.


 * PHP 5.2.6 installed Could not find a suitable database driver!
 * For MySQL, compile PHP using --with-mysql, or install the mysql.so module
 * For PostgreSQL, compile PHP using --with-pgsql, or install the pgsql.so module


 * SORTED IT ...
 * It was me being silly. Although I'd put my PHP stuff into C:\PHP\php-5.2.6-Win32, in the php.ini I was actually invoking the extension directory as C:\PHP\php-5.6.2-Win32.
 * I found this by finding and checking the Apache error log. I also found I was invoking a dll that it couldn't invoke (which I didn't need) so I got rid of that and now I'm up and running.
 * Apologies for bothering you, but might be worth leaving this post up in case someone else gets the same trouble.
 * —82.3.223.23 14:38, 14 July 2008 (UTC)

(RESOLVED) share table user for multiwikis

 * MediaWiki: 1.11.0
 * PHP: version 5
 * MySQL: version 4

hi

i am working with mediawiki-1.11.0 i am working with multiples wikis using same database, same souce code, same host and i use tables prefixes to identify which tables belong to each wiki.

how i can do for share all users on each wiki created?

thanks --200.77.227.68 21:28, 8 August 2008 (UTC)


 * I would recommand updating to 1.13 as this version has better support for shared tables. Then see Manual:$wgSharedDB, Manual:$wgSharedPrefix and Manual:$wgSharedTables. i Alex  21:45, 16 August 2008 (UTC)

(RESOLVED) mysql database error 1146

 * MediaWiki: 1.12.0
 * PHP: 5.2.6
 * MySQL: 5.0.45
 * URL: http://csdms.colorado.edu

Hi all, I just did a wiki upgrade 1.11.0 -> 1.12.0, all according to the upgrade help page. The upgrade went pretty smooth but I'm facing some errors now. When I try to create any template it will give me the following error:

Database error

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "Database::select". MySQL returned error "1146: Table 'wikidb.mw_protected_titles' doesn't exist (localhost)".

Any idea how I can get ride of that error message? Thanks in advance, Albert.

—128.138.77.41 16:09, 26 August 2008 (UTC)
 * Solved. I forgot to ran the 'update script'. /maintenance/update.php. That did the trick.--Albert Ke 18:04, 26 August 2008 (UTC)