News:

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

Main Menu

Converting phpbb2 to smf

Started by G3RT, January 06, 2005, 02:34:29 PM

Previous topic - Next topic

G3RT

Hi,
I'd like to convert my old forum (phpbb2) to smf.
I installed the smf, uploaded the phpbb2_to_smf.php file
into the home dir of smf.
It asks for 2 abosulte paths and i have 1 forum on
forum.bull-it.net and the smf on hxxp:forum2.bull-it.net [nonactive]
so the only difference in the path is the '2'.
But it just won't accept it. It accepts the first path
but on the second it can't find the config file..
help

packman

The chances are that it's picked up the SMF directory correctly (it will be in the SMF config file), so it can't find the phpBB2 directory on the path you've given it. The path is the directory path on the server, but the information you've given looks like subdomain names. It's possible that the paths would be something like /home/forum.bull-it.net/public_html/phpBB2 and /home/forum2.bull-it.net/public_html/smf (assuming that SMF is in forum2)., but you'd need to confirm whether this matches the directory structure on your server. For phpBB2 you're looking for the directory that contains extension.inc and config.php if that helpd you to track it down.
Chris

G3RT

#2
well the paths i used are:

phpbb: /home/vhosts/httpd/bull-it.net/subdomains/forum/httpdocs

(and that's definitley the directory where my config.php en my hxxp:extension.inc [nonactive] are)

and the only thing i have to change is forum into forum2:

smf: /home/vhosts/httpd/bull-it.net/subdomains/forum2/httpdocs


It still doesn't work

packman

What is the exact error message that's being displayed?
Chris

G3RT

==========================================================
Unable to find the settings for phpBB2. Please double check the path and try again.
==========================================================

Grudge

Easy way, drop config.inc.php (Or whatever the config file is called in phpBB - I forget!) into the SMF directory. Basically, all it's looking for is that one file - so if you put it in the same directory as SMF then you can leave both paths the same
I'm only a half geek really...

packman

phpBB2 uses config.php. You'd also need to put a copy of extension.inc into the SMF directory as well. The converter loads extension.inc first to find the extension being used for php files, specifcally config.php.

<Later>

Actually, putting config.php into the SMF directory will cause errors. The phpBB2 path name is used during the avatar, smiley and attachment conversions.

One thought...does extension.inc contain a line like...

$phpEx = "php";


That's assuming your server uses .php as the extension for PHP files. I'm not sure whether phpBB2 would work with that line missing, but it would stop the converter from finding config.php.
Chris

G3RT

#7
nope, that line is right were it should be.
even with a clean phpbb2 install it fails to find the config file. (I just tried) So I assume the problem is in the server configuration.

some info:
phpbb version 2.0.11
PHP Version 4.3.10
MySQL version 4.0.18

any idea what it can be? ::)

edit:



I've tried the following code; just a simple php file which tries to include the hxxp:extension.inc [nonactive]:

test.php
require_once ('/home/httpd/vhosts/bull-it.net/subdomains/forum/httpdocs/extension.inc');

with the following results:

Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/bull-it.net/subdomains/forum/httpdocs/extension.inc) is not within the allowed path(s): (/home/httpd/vhosts/bull-it.net/subdomains/forum2/httpdocs:/tmp) in /home/httpd/vhosts/bull-it.net/subdomains/forum2/httpdocs/test.php on line 3

Warning: main(/home/httpd/vhosts/bull-it.net/subdomains/forum/httpdocs/extension.inc): failed to open stream: Operation not permitted in /home/httpd/vhosts/bull-it.net/subdomains/forum2/httpdocs/test.php on line 3

Fatal error: main(): Failed opening required '/home/httpd/vhosts/bull-it.net/subdomains/forum/httpdocs/extension.inc' (include_path='.:/php/includes:/usr/share/php') in /home/httpd/vhosts/bull-it.net/subdomains/forum2/httpdocs/test.php on line 3


I dont know exactly what it means but, i guess it explains why it cant get the configurations files.
anyone knows a sollution for this?

an option is to include al files needed in the same directory as SMF. Only i dont know what files are needed...
config.php, hxxp:extension.inc [nonactive], the directory with avatars/smileys/attachments, anymore?


G3RT

well i copied in the same subdomain, and with some cutting
and pasting everything works now,
thx  8)

packman

Your server probably has open_basedir virtual domain security or safe mode turned on in PHP and this is preventing the script in the SMF directory from accessing files in the phpBB2 directory.
Chris

evilsmiley

#10
I'm getting the same error, how exactly did you fix it?

I tried looking through my phpbb2 options and saw nothing about safe mode or anything like that.

thanks in advance for your help.

-= EDIT =-

I set up the database users to have privilages on each other's databases and got it to convert.

-= EDIT =-

jaspinall

Quote from: packman on January 07, 2005, 12:41:02 PM
Your server probably has open_basedir virtual domain security or safe mode turned on in PHP and this is preventing the script in the SMF directory from accessing files in the phpBB2 directory.


How would one go about correcting a server to reflect your instructions above?  I'm trying to convert one of my smaller phpbb forums into SMF so I can take a proper look at it's capabiliities and more importantly, loading on my server, before hitting SMF with my BIG forum (3000+ members, 120k posts) which I can imagine will take some time to import...

I've tried copying config.php and extension.php into my SMF folder, but when I provide my known working SMF database password I get the following error:


Sorry, the database connection information used in the specified installation of SMF cannot access the installation of phpBB2. This may either mean that the installation doesn't exist, or that the MySQL account used does not have permissions to access it.


A better, more intelligent, more verbose convertor would certainly help long standing phpBB admins convert - hint hint ;)

packman

Quote from: jaspinall on January 23, 2005, 02:56:27 PM
How would one go about correcting a server to reflect your instructions above?

Do you have access to the php.ini file? If so, then I'd suggest you read up about the implications of disabling safe_mode and/or open_basedir before deciding whether it's something you want to do. Whether you want to change the settings for these options will depend on how your server is used and who uses it. The two options are clearly labelled in php.ini if you want to change their settings, e.g.

Quote; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =

Quote from: jaspinall on January 23, 2005, 02:56:27 PM
A better, more intelligent, more verbose convertor would certainly help long standing phpBB admins convert - hint hint ;)

In this case the converter is being pretty explicit. It's tried to use the information provided in the phpBB2 config files to access your phpBB2 database and MySQL is saying that access isn't allowed. The only way I can think of to make the converter more intelligent in this respect is to try to make it hack into the database which I'm sure most people would object to!
Chris

jaspinall

Quote from: packman on January 23, 2005, 04:19:05 PM
Quote from: jaspinall on January 23, 2005, 02:56:27 PM
How would one go about correcting a server to reflect your instructions above?

Do you have access to the php.ini file? If so, then I'd suggest you read up about the implications of disabling safe_mode and/or open_basedir before deciding whether it's something you want to do. Whether you want to change the settings for these options will depend on how your server is used and who uses it. The two options are clearly labelled in php.ini if you want to change their settings, e.g.

I have access to the php.ini on my dedicated server...and indeed seen the line to open_basedir.  I guess I need to read up on that option in more detail to see how it is used...

Quote from: packman on January 23, 2005, 04:19:05 PM
Quote; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =

Quote from: jaspinall on January 23, 2005, 02:56:27 PM
A better, more intelligent, more verbose convertor would certainly help long standing phpBB admins convert - hint hint ;)

In this case the converter is being pretty explicit. It's tried to use the information provided in the phpBB2 config files to access your phpBB2 database and MySQL is saying that access isn't allowed. The only way I can think of to make the converter more intelligent in this respect is to try to make it hack into the database which I'm sure most people would object to!


True, but in my case it's my server, so "hacking" as you put it wouldn't be a problem ;)  The config.php is merely a pointer to a database on the server, not residing in the local path of the old phpBB forum I'm trying to import.  Why the mysql daemon is rejecting the connection based upon the details in the config.php file I'm unsure of, without looking at the convertor code in more detail :|

SaltedWeb

Hello,
I can not seem to find a solution to this conversion.

I know exactly where the two files are, and yet it cant find them.
{Unable to find the settings for phpBB2. Please double check the path and try again}
comes up know matter what I seem to do.

Help would be appreciated, I saw a solution from one member but he didnt clarify what he copied and pasted to make it work?

If sfm was installing the same directory as phpbb would that work?


Thanks

Paul

Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Kirby

yes, it would work, but you must ensure there are NO phpBB files left in there.
you can, however, move the 2 files into the current SMF directory, run the converter, point it to the SMF directory (or just leave it as it is), then delete them when everything is done and working, or back them up

you should also try to CHMOD them to 777 :)

[Unknown]

I bet your problem is caused by PHP configuration restrictions, Diamondcomputer.

-[Unknown]

SaltedWeb

#17

I did it  :D

this is sweet.
I ran a test  phpbb2 and  SMF

I found the permissions was a factor,once i got that correct all was ok.

But I cant stress enough that my password was not
what it said in ( settings.php) but upon copy pasting it .
It worked.

This was easy, you just have to poke and pay attention to the details.


Thanks For The Help


Paul


Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

rotor

Hi i've got the same problem ...

and cant make head nor tails of how you fixed it ???

where did you copy paste it to make it work ??

jaijaymama


Advertisement: