Re: [SMW-devel] restoring XML backup

2007-11-06 Thread cnit
> Whoa, slow down.  Does your new installation work?  When you follow the
> exact instructions in the INSTALL file under "Testing your 
> Installation", do you get the expected results?
Actually I am not so fast, as you see.. All the steps mentioned above
are passed successfully. No wonder, because I've used to install
SMW0.6 and SMW0.7 previousely, and the later one runs fine on my site.

> Since you're having problems with categories (see later), try making a
> few nested subcategories and doing queries on them.

> I don't know if the old backups are compatible.  With each SMW and
> MediaWiki update I made a backup but I made the upgrade in-place and ran
> the updates scripts and SMWAdmin with no incident, so I never had to try
> the backups.
Yes, I've executed SMWAdmin before the XML restore. It worked fine. I
do not trust upgrade scripts, I feel they are more vulnerable to bugs
comparing to XML backups.

>Error in fetchObject(): Table 'yarsu.cats4' doesn't exist (127.0.0.1)

> I think "catNNN" are temporary tables that SMW creates in 
> getCategoryTable() when it makes "a (temporary) table that contains the
> lower closure of the given category wrt. the category table."  I'm not
> sure why it's failing.  It could be a database-level problem, such as a
> permissions issue.
Database permissions are  SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, LOCK 
TABLES
These were enough for SMW 0.7. And yes, I've restored the XML backups
with older versions. Though, I realize that the difference between 0.7
and 1.0 is much wider.


> What PHP and MySQL versions are you running?
PHP 5.2.4 and MySQL 5.0.45, accordingly. Works with MW 1.10/SMW 0.7
just fine. When I've used to install 1.93/SMW 0.6 some time ago, I've
had a major screwup with mysql RPM, which installed by default with
charset settings ISOsomething instead of unicode. Since then, I
implicitely specify UTF8 as default charset.

> In the failures you attached, the MediaWiki import script is parsing the
> XML of a page that apparently has an  inline query in it, so it's
> calling smwfProcessInlineQuery()

> Can you try making a simple query for a category from Special:Ask?  E.g.
> [[Help:+]]
Can't right now, see below the explanation why..

> I guess you could try removing the inline query (search for ask) from
> the XML file and try reimporting.
> It's the inline queries for category that seem to be causing grief, so I
> think you should focus on removing those first.
Yes, I've removed all the ask queries and it imported just fine.

> I think you can and should run the SMW_unifyProperties.php maintenance
> script after import.
I've changed the namespace names to Property:Propertyname
manually inside the dump... Another advantage of using the dump :-)

> I think that must be a table produced by something.  SMW doesn't use
> class="tbl...".  So maybe you have some other extension or template 
> that's generating tables.
I've not realized that tags were quoted so 

> I hope these guesses help.
> --
Thanks for the help.

I guess there are more permissions needed by SMW 1.0RC2 comparing to
SMW 0.7. I've added CREATE TEMPORARY TABLES to mysql priviledges and
now it imported the rest of the dump just fine, too. But, I wasn't
happy for a long time. An attemnt of executing Special:Ask page
results with httpd consuming 99% of CPU infinitely, until I shutdown
it and restart :-( Will investigate further tomorrow...

Dmitriy


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] restoring XML backup

2007-11-02 Thread Asheesh Laroia
On Fri, 2 Nov 2007, S Page wrote:

> cnit wrote:
>
>> Are the old MW 1.10/SMW 0.7 XML backups compatible with
>> MW 1.11/SMW 1.0RC1?
>
> Whoa, slow down.  Does your new installation work?  When you follow the
> exact instructions in the INSTALL file under "Testing your
> Installation", do you get the expected results?
>
> Since you're having problems with categories (see later), try making a
> few nested subcategories and doing queries on them.
>
>>  I am trying to import my backup into the new
>> installation,  but it throws such error (smw_error1.txt).
>
> I don't know if the old backups are compatible.  With each SMW and
> MediaWiki update I made a backup but I made the upgrade in-place and ran
> the updates scripts and SMWAdmin with no incident, so I never had to try
> the backups.

As someone with no backup to speak of nor a SMW lead developer, it sounds 
like the best thing to do is to restore the backup into the version it was 
taken from, and then use the built-in upgrade system to live upgrade 
between point releases of SMW/MW to upgrade your data format.

-- Asheesh.

--
A diplomatic husband said to his wife, "How do you expect me to remember
your birthday when you never look any older?"

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


Re: [SMW-devel] restoring XML backup

2007-11-02 Thread S Page
cnit wrote:

> Are the old MW 1.10/SMW 0.7 XML backups compatible with
> MW 1.11/SMW 1.0RC1?

Whoa, slow down.  Does your new installation work?  When you follow the
exact instructions in the INSTALL file under "Testing your
Installation", do you get the expected results?

Since you're having problems with categories (see later), try making a
few nested subcategories and doing queries on them.

>  I am trying to import my backup into the new
> installation,  but it throws such error (smw_error1.txt).

I don't know if the old backups are compatible.  With each SMW and
MediaWiki update I made a backup but I made the upgrade in-place and ran
the updates scripts and SMWAdmin with no incident, so I never had to try
the backups.

So everything I write is guessing 8-/

   Error in fetchObject(): Table 'yarsu.cats4' doesn't exist (127.0.0.1)

I think "catNNN" are temporary tables that SMW creates in
getCategoryTable() when it makes "a (temporary) table that contains the
lower closure of the given category wrt. the category table."  I'm not
sure why it's failing.  It could be a database-level problem, such as a
permissions issue.  What PHP and MySQL versions are you running?  If you
can make a smaller XML file that fails to import, you can modify
MediaWiki's LocalSettings.php to turn on extra SQL logging, for example:

   ## === from http://meta.wikimedia.org/wiki/How_to_debug_MediaWiki ===
   /**
* The debug log file should be not be publicly accessible if it is
used, as it
* may contain private data. */
   $wgDebugLogFile = 'mediawiki_debug_log.txt';
   # Override DefaultSettings.php
   $wgShowSQLErrors = true;
   ## === from http://www.mediawiki.org/wiki/Manual:%24wgDebugDumpSql
   $wgDebugDumpSql = true;

and send part of the log file.

In the failures you attached, the MediaWiki import script is parsing the
XML of a page that apparently has an  inline query in it, so it's
calling smwfProcessInlineQuery()

Can you try making a simple query for a category from Special:Ask?  E.g.
[[Help:+]]

I guess you could try removing the inline query (search for ask) from
the XML file and try reimporting.

> 
> After that, I've decided to remove all the Attribute:
> namespace pages from the dump.

It's the inline queries for category that seem to be causing grief, so I
think you should focus on removing those first.

I think you can and should run the SMW_unifyProperties.php maintenance
script after import.

> Drop all the tables,
> recreate the /config, do Special:SMWAdmin, now it throws another
> error (smw_error2.txt)

Almost the same error but now
   Error in fetchObject(): Table 'yarsu.cats1' doesn't exist (127.0.0.1)

so again, the temporary queries of category tables don't work.


> Next, I've removed Relation: namespace pages from the dump.
> Now it produces the following error (smw_error3.txt)
> 
> One of the functions parameter is ' Maybe someone can give me an advice which other pages shall I
> remove from the dump, to do not interfere with SMW 1.0RC1? I can
> recreate Attribute pages manually to the Property namespace,
> just a few pages - not much of work...


I would remove anything that has an  query in it, and/or anything
that has the mysterious extension or template that's generating the
class="tbl stuff.

I hope these guesses help.
--
=S Page


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


[SMW-devel] restoring XML backup

2007-11-02 Thread cnit
Hi!
Are the old MW 1.10/SMW 0.7 XML backups compatible with
MW 1.11/SMW 1.0RC1? I am trying to import my backup into the new
installation, but it throws such error (smw_error1.txt).

After that, I've decided to remove all the Attribute:
namespace pages from the dump. Drop all the tables,
recreate the /config, do Special:SMWAdmin, now it throws another
error (smw_error2.txt)

Next, I've removed Relation: namespace pages from the dump.
Now it produces the following error (smw_error3.txt)

One of the functions parameter is 'parse('createUpdates(Object(Revision))
#9 [internal function]: WikiRevision->importOldRevision()
#10 /var/www/wiki/engine/includes/Database.php(1918): 
call_user_func_array(Array, Array)
#11 /var/www/wiki/engine/includes/SpecialImport.php(513): 
Database->deadlockLoop(Array)
#12 [internal function]: WikiImporter->importRevision(Object(WikiRevision))
#13 /var/www/wiki/engine/maintenance/importDump.php(59): call_user_func(Array, 
Object(WikiRevision))
#14 [internal function]: BackupReader->handleRevision(Object(WikiRevision), 
Object(WikiImporter))
#15 /var/www/wiki/engine/includes/SpecialImport.php(764): 
call_user_func_array(Array, Array)
#16 [internal function]: WikiImporter->out_revision(Resource id #48, 'revision')
#17 /var/www/wiki/engine/includes/SpecialImport.php(429): xml_parse(Resource id 
#48, '???...', 0)
#18 /var/www/wiki/engine/maintenance/importDump.php(110): 
WikiImporter->doImport()
#19 /var/www/wiki/engine/maintenance/importDump.php(97): 
BackupReader->importFromHandle(Resource id #46)
#20 /var/www/wiki/engine/maintenance/importDump.php(132): 
BackupReader->importFromStdin()
#21 {main}
# php maintenance/importDump.php fetchObject(false)
#1 
/var/www/wiki/engine/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php(112):
 SMWSQLStore->getQueryResult(Object(SMWQuery))
#2 
/var/www/wiki/engine/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php(163):
 SMWQueryProcessor::getResultHTML('?[[:=*]...', Array)
#3 [internal function]: smwfProcessInlineQuery('?[[:=*]...', Array, 
Object(Parser))
#4 /var/www/wiki/engine/includes/Parser.php(626): 
call_user_func_array('smwfProcessInli...', Array)
#5 /var/www/wiki/engine/includes/Parser.php(304): Parser->strip('editUpdates('parse('createUpdates(Object(Revision))
#9 [internal function]: WikiRevision->importOldRevision()
#10 /var/www/wiki/engine/includes/Database.php(1918): 
call_user_func_array(Array, Array)
#11 /var/www/wiki/engine/includes/SpecialImport.php(513): 
Database->deadlockLoop(Array)
#12 [internal function]: WikiImporter->importRevision(Object(WikiRevision))
#13 /var/www/wiki/engine/maintenance/importDump.php(59): call_user_func(Array, 
Object(WikiRevision))
#14 [internal function]: BackupReader->handleRevision(Object(WikiRevision), 
Object(WikiImporter))
#15 /var/www/wiki/engine/includes/SpecialImport.php(764): 
call_user_func_array(Array, Array)
#16 [internal function]: WikiImporter->out_revision(Resource id #48, 'revision')
#17 /var/www/wiki/engine/includes/SpecialImport.php(429): xml_parse(Resource id 
#48, '?? ...', 0)
#18 /var/www/wiki/engine/maintenance/importDump.php(110): 
WikiImporter->doImport()
#19 /var/www/wiki/engine/maintenance/importDump.php(97): 
BackupReader->importFromHandle(Resource id #46)
#20 /var/www/wiki/engine/maintenance/importDump.php(132): 
BackupReader->importFromStdin()
#21 {main}
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/___
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel