PDA

View Full Version : PHP5 and vB2 to vB3 import


nswan
Wed 11th Aug '04, 8:46pm
When trying to import from vB2 to vB3, I get a PHP error when I attempt to import posts. There error is as follows:

Fatal error: Non-static method ImpExFunction::parse_smilie_callback() cannot be called statically in /oursite/public_html/boards/impex/ImpExFunction.php(315) : regexp code on line 1

I checked the code at and around line 315 of the given page, but I couldn't see the problem. I couldn't see in the code that the parse_smilie_callback() function was ever being called statically. I've seen similar errors in my work with PHP5 as it is more strict in such things, but I haven't been able to figure out why this error is being generated.

Any ideas would be greatly appreciated.

--Nicole

Zachery
Wed 11th Aug '04, 8:51pm
Are you trying to avoid the upgrade route?

The vB2 > vB3 importer is still in beta at this time. i would suggest upgrading to vB3 instead of trying an import.

nswan
Wed 11th Aug '04, 8:57pm
Thanks for the reply. Problem is that I'm changing servers. So I did a new installation of vB3 and need to move the old forum stuff from the old server to the new one.

I'm also pretty sure that this isn't a problem with the script being beta so much as it is that PHP5 is hiccuping a little on it. I'm guessing this error wouldn't be thrown if the script was running on a server running PHP 4.x (which isn't an option at this point).

I'm thinking (hoping) that this is something easily fixed. I just can't see what exactly is throwing the error.

Zachery
Wed 11th Aug '04, 9:11pm
It would still be easier to move the old database to the new server and run the upgrade script.

As we don't recomend php5 yet and i am not a dev i am not sure what the real problem is.

nswan
Thu 12th Aug '04, 6:01pm
The problem is that I'm still going to have to do an import at some point anyway. I want to get an installation up on the new server, but need to keep the old one still functioning until the new server goes live. Thus, (even if I upgraded then copied over to the new server, or copied then upgraded) I would still have a data differential that would need to be ported from the old system to the new one.

I still think this is a minor PHP5 thing, but I'm not quite sure how to fix it.

Wayne Luke
Thu 12th Aug '04, 6:52pm
vBulletin and IMPEX have not been completely tested on PHP5 and we do not recommend using it at this time.

nswan
Thu 12th Aug '04, 7:36pm
Thanks for the reply, but not using PHP 5 is not really an option at this point.

Someone involved in the development of the ImpEx vb2 -> vb3 script has to know a little work around for this problem. Or at least I'm hoping. :/

I was able to get through module 6 of the imports with no problem.

Thanks,

Nicole

nswan
Thu 12th Aug '04, 10:27pm
Well, I guess my best option at this point is to shut my boards down, upgrade the existing installation to 3.0.3 and then copy everything over to the new server.

Unfortunately, that means the boards will be shutdown for several days as I don't want people to continue to post on the old boards in the time between when i copy and the server goes live (because the import scripts don't work). But, this looks like my only choice.

Now, any chance of step-by-step documentation for upgrading from 2.2.6 to 3.0.3? I'm assuming I upgrade to 2.3.5 then to 3.0.3?

Steve Machol
Thu 12th Aug '04, 11:04pm
Upgrade to 2.3.5:
http://www.vbulletin.com/members/upgrade.html

Upgrade to 3.0.3:
http://www.vbulletin.com/docs/html/upgrade/

Jerry
Fri 13th Aug '04, 7:56am
Make the if online 312 in ImpexFunction.php :

if(false)

That way the smile call back code won't be reached.

nswan
Fri 13th Aug '04, 1:15pm
Excellent, excellent! Jerry, I salute you! That's exactly what I was looking for.

With Jerry's lovely solution, I was able to get everything imported.

A couple questions though: None of my forums actually show up on the view forum page. The default "Main Category" and "Main Forum" ones show up, but none of mine. If I manipulate the display forum id to be that of an imported forum, it gives me an "Access Not Allowed" error. Is this a permissions thing?

Also, I thought I read something about password hashing being different in vB3. I noticed I couldn't log on to the new system with my imported account until I changed my password. With the new hashing, will all my users need to do this?

Thanks again for everyone's help,

Nicole

nswan
Fri 13th Aug '04, 3:19pm
Okay, I did update counters to repair the forums, threads, posts, users, etc and the forums are appearing correctly now. The passwords also seem to work now. There still a little funkiness with the forum view, but I think (let's hope) I can get that working. Viewing individual thread bodies, however, is throwing a SQL error about an ambiguous column name. Hopefully, I can track down the origination of the SQL statement and fix it to not be ambiguous.

Steve Machol
Fri 13th Aug '04, 3:21pm
This is most likely caused by using an unstable version of MySQL:

http://www.vbulletin.com/forum/showthread.php?p=700367#post700367