[SMF Converter] PHP-Fusion 7

Started by ThorstenE, February 21, 2009, 02:08:44 PM

Previous topic - Next topic

Norv

Can you please: login in phpMyAdmin, select SMF's database, the table smf_attachments (or your_prefix_attachments, if you use another prefix for SMF tables), and simply browse it. Are there many records there?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

luuuciano

It shows just 1 record...

maybe can I add some code to the convert attachment sections to see/log what is happening there?

(but I do not know too much php...)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Norv

Looking a bit in the code, it seems a strange little thing is here, can you please try:
Code (find) Select

---* {$to_prefix}attachments
---{


and remove the line after it:

$no_add = true;

Just remove this no_add line. Then, please restart the conversion. I didn't test, but it seems it should work just fine.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

luuuciano

oh, in the sql file!

found it :)

will test it
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

luuuciano

It shows this:
QuoteConverting...
Converting posts (this may take some time)...
Successful.
Converting personal messages (step 1)... Successful.
Converting personal messages (step 2)... Successful.
Converting topic notifications... Successful.
Converting attachments...
Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/cba2kes/public_html/foros/Sources/Subs-Db-mysql.php on line 641
The database value you're trying to insert does not exist: id_attach

previously I have deleted the files of the smf attachments directory
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Norv

Please try: (<SMF's folder>/Sources/Subs-Db-mysql.php)
Code (find) Select

// Here's where the variables are injected to the query.
$insertRows = array();
foreach ($data as $dataRow)
$insertRows[] = smf_db_quote($insertData, array_combine($indexed_columns, $dataRow), $connection);


Code (replace) Select

// Here's where the variables are injected to the query.
echo "indexed_columns:<br>";
var_dump($indexed_columns);
echo "<br>";
$insertRows = array();
foreach ($data as $dataRow) {
echo "dataRow: <br>";
var_dump($dataRow);
echo "<br>";
$insertRows[] = smf_db_quote($insertData, array_combine($indexed_columns, $dataRow), $connection);
}


Then, there is no need to delete the attachments (though you might want to clear the folder before the last conversion you do, because the converter will create yet another set of hashed-named files, doubling the number of files at each run :). You most likely won't want duplicates for the real forum).
Then, please re-run the conversion. It should write out on the page a lot more data. The last messages before the error will be useful.

Note: with this modification, a lot more data will appear on forum too. Please undo this modification as soon as possible, after running the conversion, it's definitely meant for testing/debugging, not for a real site.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

luuuciano

I have changed it, then uploaded and converted... here the last lines:

Converting attachments...indexed_columns:
array(8) { [0]=> string(9) "id_attach" [1]=> string(4) "size" [2]=> string(8) "filename" [3]=> string(9) "file_hash" [4]=> string(6) "id_msg" [5]=> string(9) "downloads" [6]=> string(5) "width" [7]=> string(6) "height" }
dataRow:
array(8) { ["id_attach"]=> int(1) ["size"]=> string(5) "10210" ["filename"]=> string(60) "recorrido-a-san-fernando-por-villa-allende-y-alrededores.kmz" ["file_hash"]=> string(40) "c2ee012163b4d8d234564dce9c7a52e11fdc45dd" ["id_msg"]=> string(2) "66" ["downloads"]=> string(1) "0" ["width"]=> string(1) "0" ["height"]=> string(1) "0" }
dataRow:
array(7) { ["id_attach"]=> string(1) "1" ["size"]=> string(5) "10210" ["filename"]=> string(60) "recorrido-a-san-fernando-por-villa-allende-y-alrededores.kmz" ["id_msg"]=> string(2) "66" ["downloads"]=> string(1) "0" ["width"]=> string(1) "0" ["height"]=> string(1) "0" }

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/cba2kes/public_html/foros/Sources/Subs-Db-mysql.php on line 647
The database value you're trying to insert does not exist: id_attach


no more info provided
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Norv

Please add back the line

$no_add = true;

where it was before, and add a few lines down:
Code (find) Select

if (copy($yAttachmentDir . '/' . $row['filename'], $attachmentUploadDir . '/' . $physical_filename))
{

Code (add after) Select

$no_add = false;
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

luuuciano

changes done, convert...

and it shows the same message:
Successful.
Converting attachments...indexed_columns:
array(8) { [0]=> string(9) "id_attach" [1]=> string(4) "size" [2]=> string(8) "filename" [3]=> string(9) "file_hash" [4]=> string(6) "id_msg" [5]=> string(9) "downloads" [6]=> string(5) "width" [7]=> string(6) "height" }
dataRow:
array(8) { ["id_attach"]=> int(1) ["size"]=> string(5) "10210" ["filename"]=> string(60) "recorrido-a-san-fernando-por-villa-allende-y-alrededores.kmz" ["file_hash"]=> string(40) "44c8af055269b1b6bcd9a27db40ec0c3c20f98fe" ["id_msg"]=> string(2) "66" ["downloads"]=> string(1) "0" ["width"]=> string(1) "0" ["height"]=> string(1) "0" }
dataRow:
array(7) { ["id_attach"]=> string(1) "1" ["size"]=> string(5) "10210" ["filename"]=> string(60) "recorrido-a-san-fernando-por-villa-allende-y-alrededores.kmz" ["id_msg"]=> string(2) "66" ["downloads"]=> string(1) "0" ["width"]=> string(1) "0" ["height"]=> string(1) "0" }

Warning: array_combine() [function.array-combine]: Both parameters should have an equal number of elements in /home/cba2kes/public_html/foros/Sources/Subs-Db-mysql.php on line 647
The database value you're trying to insert does not exist: id_attach
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

luuuciano

maybe something is bad in my phpfusion database?

several attachments conversion worked ok in other cases?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

luuuciano

well I guess I will be doing a "manual" convert of important attachments, lol
:)

(at least it will free space and dump dumb attachments)
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

SilvaD

Hi guys
So I downloaded the convert.php and the phpfusion_to_smf.sql attachments, I've installed SMF and uploaded the above mentioned files, I went to the convert.php file, got the boxes, filled in the path to SMF, path to Fusion, database password, however when I click "Continue" all I get is a white page :S Any ideas?

luuuciano

After a conversion users can not set threads as viewed... you click the link to see unread threads, and there is allways the same links... no mather if you try marking all as read...
I have tried making a new user... all users see the same "unread threads"...

any idea?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

luuuciano

well, finally I have used the 1.11.1 converter instead the not yet finished 2.0rc2 converter...
and the unread thread issue is not present...

but avatars were not translated... all the users are there without avatar settings at all and no file copied...

in phpfusion 7 avatars are stored in http://domain.com/images/avatars/
not in http://domain.com/forum/attachments
(the are just attached files)

any idea?
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

DjCrUzItOReY


ThorstenE

@SilvaD:
please check Common conversion errors... I'm not 100% sure but a white page is often related  toa read only php session dir.

@luuuciano,
we can modify the converter slightly, did you get any errors during avatar conversion?

@ DjCrUzItOReY,
sorry but this part of SMF is english only.. please check our language specific support boards.

Wiejeben

Quote from: Norv on October 24, 2009, 06:24:37 PM
Please try adding this code to your_smf_directory/Sources/LogInOut.php :
Code (find) Select

// phpBB3 users new hashing.  We now support it as well ;).

Code (add before) Select

// php-fusion 6.x Login Method?
$other_passwords[] = md5(md5($_REQUEST['passwrd']));


UPDATE: it should work just fine for phpfusion 7 as well. Please make sure you empty your browser's cache and don't save passwords in the browser, and try logging in after this modification.
Thanks, the login is working again :D
But, there's one problem  :-\ I need to login twice...
First time: I can see myself at the "online members list"
Second time: Am I online...

After that I logout again... And login again.. but than it's just working once.. Deleting cookie's etc. I need to login twice  ??? (Could be a problem in Firefox ?)

X-Seti

#77
Ok, So I have the old php-fusion 7 site and the new installed smf 1.1.11 site install where I would like the data converted too.

I copied the files convert.php into my SMF folder, plus the other files attached to this thread.

SMF path; /Webroot/www/clan-eve
PHP fusion; /Webroot/www/claneve

I add the info it needs plus the database password.

Hit next where the browser status says Done, with a blank page???


Norv

Can you please try using the files in the package found in this site's Downloads > Converters?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

X-Seti

Quote from: Norv on August 20, 2010, 02:04:48 PM
Can you please try using the files in the package found in this site's Downloads > Converters?

Been there, I have the right convert.php the 80.7 KB (82637 bytes), 4 hours later after alot of missing around I get the darn thing to work. :)
http://www.ukscifi.net/claneve/ [nofollow] converted to http://www.ukscifi.net/clan-eve/ [nofollow]

I am doing this for a friend, getting then onto SMF. :)

Member logins arn't working, but I'll try and fix this tomorrow.

Advertisement: