News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

YABb 2.1 conversion errors

Started by vfrjon, August 06, 2008, 09:48:14 PM

Previous topic - Next topic

vfrjon

Had a look at the DB tables and the smf_topics table has lots of zeros!

ID_TOPIC ID, ID_LAST_MSG, ID_FIRTS_MSG, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, numReplies are all zeros,

NUM_VIEWS,isStick, ID_BOARD,tempID are all populated

vfrjon


SleePy

Ok, its the topics table that we have an issue with then.

Is there a column still called tempId?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

Yeap.

ID_TOPIC ID, ID_LAST_MSG, ID_FIRTS_MSG, ID_MEMBER_STARTED, ID_MEMBER_UPDATED, numReplies are all zeros,

NUM_VIEWS,isStick, ID_BOARD,tempID are all populated


vfrjon

Also noticed that there are no PM's and the PM table in the database is empty.

Still have the
QuoteThe SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
    File: mywebsite/htdocs/newforum/Sources/BoardIndex.php
    Line: 84

SleePy

Ok,

So it didn't finish the conversion :| That column should of been dropped, and no messages should have an id of 0 nor topics. This would cause the indexes to not be created. Without these indexes the forum would be really slow.

Have you tried converting via command line? I am wondering if you have a server that just doesn't want to handle it via httpd because of apache timeouts. Using command line would avoid apache and let us just work straight with php.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

How do I do it via the command line? From within PHPAdmin? What command do I make?

ThorstenE

Quote from: vfrjon on August 27, 2008, 12:10:02 AM
How do I do it via the command line? From within PHPAdmin? What command do I make?

you need SSH- or telnet-access to the server for using the command line version..

QuoteSMF Command-line Converter
Usage: /path/to/php -f /path/to/smf/convert.php -- [OPTION]...

    --path_to               Path to SMF (/path/to/smf).
    --path_from             Path to the software that you are converting from.
    --convert_script        The name of the script. (old_forum_to_smf.sql)
    --db_pass               SMF database password. "The MySQL password (for verification only.)"
    --debug                 Output debugging information.

vfrjon

From what I can see, No, I dont have access to SSH or telnet access on my webserver.

I do have an older version of phpadmin, appache, mysql etc locally that I used to develop the site originally (its largely database driven)
Perhaps I could backup the yabb forum and do it locally. Seems like a lot of up/downloading tho.

Any other way to do it?

ThorstenE

Quote from: vfrjon on August 27, 2008, 01:35:50 AM
Perhaps I could backup the yabb forum and do it locally. Seems like a lot of up/downloading tho.
This would be the best option I think,  because you can control all settings for MySQL/PHP and bypass all server based limits

vfrjon

OK, I now have phpmyadmin, MySql 5.0.51a, Apache 2.2.9 PHP 5.2.6 installed and configured locally.

I can view my website locally, and also the new SMF installation.

When I run the converter via the browser, I get the same results as when I ran it on the webserver.

I am going to try it via the command line, but am a little uncertain on where and what to type the command. Do I enter it directly into php.exe (it opens a cmd window when I run it)?

ThorstenE

open a cmd window, then in the window run:

c:\php\php.exe -f c:\apache\htdocs\smf\convert.php....

i don't know the pathes from your local installed applications, this is only a short example how to call it on a windows system..

vfrjon

#52
Thanks for your patience.

So I would use......


d:\server\php.exe -f d:\server\htdocs\newforum\convert.php --path_to=d:\server\htdocs\newforum --path_from=d:\server\htdocs\cgi-bin\yabb --convert_script=yabb21_to_smf.php --db_pass=password -- debug



Im at work at the present and cant check this for syntax.

Jon

vfrjon

Well Ive tried just about every combination of the syntax to try and run it locally via the command line and it does nothing.

All it returns is the syntax format that should be used!

More than happy to zip up the yabb files and email them to you to look at to see if you can convert them for me.

I'm starting to get emails from forum members missing the forum, so I really need to get this fixed.

SleePy

the last one for debug shouldn't have a space between -- and debug.

It may be possible that the converter doesn't work for command line on windows, I think it was only tested on linux/unix machines. If that above change doesn't work, I can have you put in some debug code that will hopefully tell us.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

Yeah, I worked that space out. I also tried it without it, and with out the debug command.



SleePy

Open the convert.php

Find:
    if (!isset($_SERVER['argv']))
        $_SERVER['argv'] = array();

Add after:
    print_r($_SERVER['argv']);
    echo "\n\n\n";


Try to run it again, this time it should output some details before the message. Let me know this information.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

vfrjon

#57
Cant find that code in convert.php

Perhaps my problem is a wrong version of convert.php ????

I downloaded it with the converter package from the download page.
I have now downloaded the one from the sticky at the top of this forum, which is a different filesize, and does have that code.
I tried running it from the webserver and it ran through ok till cleaning up part 2 where it crashes due to the big selects error.
I will try it again locally tonight, as I can control the big_selects variable (default its on already), and I will also add the debug code.

Might be an idea to get the package on the download page checked.

vfrjon

After entering the code into convert.php , I tried to run it via the command line.
This is what I get.........
Quote
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.


D:\>cd server\php

D:\server\php>php.exe -f D:\server\www\myserver.dev\public_html\htdocs\newforum\
convert.php --path_to=D:\server\www\myserver.dev\public_html\htdocs\newforum --p
ath_from=D:\server\www\myserver.dev\public_html\htdocs\cgi-bin\yabb --convert_sc
ript=yabb21_to_smf.php --db_pass=root --debug
Usage: php [options] [-f] <file> [--] [args...]
       php [options] -r <code> [--] [args...]
       php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
       php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
       php [options] -- [args...]
       php [options] -a

  -a               Run interactively
  -c <path>|<file> Look for php.ini file in this directory
  -n               No php.ini file will be used
  -d foo[=bar]     Define INI entry foo with value 'bar'
  -e               Generate extended information for debugger/profiler
  -f <file>        Parse and execute <file>.
  -h               This help
  -i               PHP information
  -l               Syntax check only (lint)
  -m               Show compiled in modules
  -r <code>        Run PHP <code> without using script tags <?..?>
  -B <begin_code>  Run PHP <begin_code> before processing input lines
  -R <code>        Run PHP <code> for every input line
  -F <file>        Parse and execute <file> for every input line
  -E <end_code>    Run PHP <end_code> after processing all input lines
  -H               Hide any passed arguments from external tools.
  -s               Display colour syntax highlighted source.
  -v               Version number
  -w               Display source with stripped comments and whitespace.
  -z <file>        Load Zend extension <file>.

  args...          Arguments passed to script. Use -- args when first argument
                   starts with - or script is read from stdin

  --ini            Show configuration file names

  --rf <name>      Show information about function <name>.
  --rc <name>      Show information about class <name>.
  --re <name>      Show information about extension <name>.
  --ri <name>      Show configuration for extension <name>.


D:\server\php>

ThorstenE

try php.exe without -f and use the full path for --convert_script=

example:
--convert_script=D:\server\www\myserver.dev\public_html\htdocs\newforum\yabb21_to_smf.php

Advertisement: