Software/Wiki/Errors
From Notes
Here are some Media Wiki errors which were difficult to troubleshoot.
Media Wiki 1.5 , brand new installation, no customizations (except for standard ones in Local Setings.php). Approximately, 40 article pages working on a mirror copy of the Wiki site.
Contents |
[edit]
"Error in fetchObject(): Can't open file: 'page.ibd'"
Error in fetchObject(): Can't open file: 'page.ibd' (errno: 1)
Backtrace:
* GlobalFunctions.php line 451 calls wfBacktrace()
* Database.php line 523 calls wfDebugDieBacktrace()
* MessageCache.php line 151 calls DatabaseMysql::fetchObject()
* MessageCache.php line 94 calls MessageCache::loadFromDB()
* MessageCache.php line 247 calls MessageCache::load()
* GlobalFunctions.php line 342 calls MessageCache::get()
* GlobalFunctions.php line 322 calls wfMsgGetKey()
* GlobalFunctions.php line 297 calls wfMsgReal()
* OutputPage.php line 657 calls wfMsgNoDB()
* Database.php line 403 calls OutputPage::databaseError()
* Database.php line 350 calls DatabaseMysql::reportQueryError()
* BagOStuff.php line 382 calls DatabaseMysql::query()
* BagOStuff.php line 279 calls MediaWikiBagOStuff::_doquery()
* BagOStuff.php line 228 calls MediaWikiBagOStuff::_query()
* MessageCache.php line 83 calls MediaWikiBagOStuff::get()
* MessageCache.php line 247 calls MessageCache::load()
* GlobalFunctions.php line 342 calls MessageCache::get()
* GlobalFunctions.php line 322 calls wfMsgGetKey()
* GlobalFunctions.php line 288 calls wfMsgReal()
* index.php line 77 calls wfMsgForContent()
ANSWER:
Not sure of the exact cause.
But here's how I fixed it.
- Restored previous backup of 'wikidb'.
- Verified correct ownership/permisson.
- chown mysql:mysql -R /var/lib/mysql
- chmod 600 -R /var/lib/mysql
- Shutdown the mysql service .
- /etc/init.d/mysql stop
- Removed /var/lib/mysql/mysqld.pid
- Restarted the mysql service .
- /etc/init.d/mysql start
Error went away. So the fix/error is anyone of the above three items.
(2005 12 30, note)
Other thoughts on what caused the error:
- Problem caused by directly moving around database RAW directories and files.
- Don't do it! :)
- Use phpMyAdmin, mysql or mysqldump commands to manipulate databases.
- for copying/renaming a database, dump one, then re-import into another.
[edit]
"Function: Revision::insertOn and cannot be null"
Message:
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 "Revision::insertOn". MySQL returned error
"1048: Column 'old_id' cannot be null (HOST.DBSERVER.COM)".
Note: Where 'HOST.DBSERVER.COM' is the connection to your Database server.
ISSUE:
(unknown)
SOLUTION:
After looking at the php code for a long time and tracing down the particular function calls, and parameters, I was unable to 1) figure out the exact issue, 2) figure out how to fix the data to resolve it.
Luckily, there were only 8 pages on the original site. So after doing a clean install with the latest version of Wiki. I cut and paste Wiki coding from older site to a new installation. I'm up and running, and no sign of the original issue.
NOTE:
Probably due to the fact of using a database setup for a previous version of MediaWiki.
[edit]
Error: 1146 Table 'DATABASENAME.user' doesn't exist
MESSAGE:
A database error has occurred
Query: SELECT user_name,user_password,user_newpassword,user_email,user_email_authenticated,user_real_name,user_options,user_touched,user_token FROM `user` WHERE user_id = '2' LIMIT 1
Function: User::loadFromDatabase
Error: 1146 Table 'DATABASENAME.user' doesn't exist (localhost)
Backtrace:
* GlobalFunctions.php line 451 calls wfbacktrace()
* Database.php line 397 calls wfdebugdiebacktrace()
* Database.php line 347 calls databasemysql::reportqueryerror()
* Database.php line 723 calls databasemysql::query()
* Database.php line 742 calls databasemysql::select()
* User.php line 679 calls databasemysql::selectrow()
* User.php line 625 calls user::loadfromdatabase()
* Setup.php line 212 calls user::loadfromsession()
* index.php line 63 calls require_once()
NOTE: DATABASENAME was the name of my wiki database.
ISSUE:
Unable to find the wiki database.
SOLUTION:
Double check all information used for accessing / connecting to the wiki database.
One of several items could be incorrect:
/** database host name or ip address */ # default $wgDBserver = "localhost"; $wgDBserver = "dbserver.home.com"; /** name of the database */ # default $wgDBname = 'wikidb'; $wgDBname = "DatabaseName"; /** */ # default $wgDBconnection = ''; $wgDBconnection = ''; /** Database username */ # default $wgDBuser = 'wikiuser'; $wgDBuser = "WikiDBUser"; $wgDBpassword = "MyPaSSwRD"; /** Table name prefix */ # default $wgDBprefix = ''; # $wgDBprefix = "DOMAIN_"; $wgDBprefix = "DOMAIN_wiki_";
[edit]
