Issue in Restore Backups in ModernBB

Avatar

By Mohsen_Nirouzad 21 July 2015 15:42

Member · 134 comments

Hi there,
I use ModernBB script to create my forum,
I toke a Forum Backup and I wanna restore it.
But I can't, ModernBB told my backup doesn't restored, I repeated it but I toke the same answer.
I use Last version of ModernBB persian ( Version. 3.7.0 )
What can I do? I need restore my backup, otherwise, I must emigrate to PunBB or ...
I think Another user ( Persian ModernBB website administrator ) reported this too and forum support team didn't answered it.
Sorry for bad English.

Last edited by Mohsen_Nirouzad (21 July 2015 20:08)


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By Yannick 21 July 2015 16:28

Administrator · 1,453 comments

The Persian ModernBB website is not official. Anyway, there is a bug in the ModernBB 3.7.0 restore feature. We're planning to release a fix for this, but do not consider it big enough to warrant a 3.7.1 release on its own. Anyway:

open root/backstage/database.php and find (line 481-483)

$backup_file_name = (!empty($HTTP_POST_FILES['backup_file']['name'])) ? $HTTP_POST_FILES['backup_file']['name'] : "";  
$backup_file_tmpname = ($HTTP_POST_FILES['backup_file']['tmp_name'] != "none") ? $HTTP_POST_FILES['backup_file']['tmp_name'] : "";  
$backup_file_type = (!empty($HTTP_POST_FILES['backup_file']['type'])) ? $HTTP_POST_FILES['backup_file']['type'] : "";  

replace with

$backup_file_name = (!empty($_FILES['backup_file']['name'])) ? $_FILES['backup_file']['name'] : "";  
$backup_file_tmpname = ($_FILES['backup_file']['tmp_name'] != "none") ? $_FILES['backup_file']['tmp_name'] : "";  
$backup_file_type = (!empty($_FILES['backup_file']['type'])) ? $_FILES['backup_file']['type'] : "";  

Save and upload the file to your server, you should now be capable of restoring the backup.

Anyway, I would suggest you upgrade to Luna 1.0 or 1.1 as these releases are actively supported (ModernBB 3.7 is too, but not active). And if you don't want to upgrade to Luna, I would like to know why not, perhaps it contains some good feedback. 🙂


You can do anything

Avatar

By Mohsen_Nirouzad 22 July 2015 07:47

Member · 134 comments

Sorry, But it already is your new code!


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By Yannick 22 July 2015 11:35

Administrator · 1,453 comments

What do you mean "already is your new code"? The recovery tool works fine for me.


You can do anything

Avatar

By Mohsen_Nirouzad 22 July 2015 13:07

Member · 134 comments

Sorry my English is very bad, in my forum, scripts is:

$backup_file_name = (!empty($_FILES['backup_file']['name'])) ? $_FILES['backup_file']['name'] : "";  
$backup_file_tmpname = ($_FILES['backup_file']['tmp_name'] != "none") ? $_FILES['backup_file']['tmp_name'] : "";  
$backup_file_type = (!empty($_FILES['backup_file']['type'])) ? $_FILES['backup_file']['type'] : "";

and you told me replace with

$backup_file_name = (!empty($_FILES['backup_file']['name'])) ? $_FILES['backup_file']['name'] : "";  
$backup_file_tmpname = ($_FILES['backup_file']['tmp_name'] != "none") ? $_FILES['backup_file']['tmp_name'] : "";  
$backup_file_type = (!empty($_FILES['backup_file']['type'])) ? $_FILES['backup_file']['type'] : "";

They both are same!
But I replaced and my problem didn't solved:
do.php?imgf=143757171881081.png

Last edited by Mohsen_Nirouzad (22 July 2015 13:28)


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By Yannick 22 July 2015 16:53

Administrator · 1,453 comments

Did you already modify your ModernBB installation? That code shouldn't be there in a normal 3.7.0 installation.


You can do anything

Avatar

By Mohsen_Nirouzad 23 July 2015 08:11

Member · 134 comments

No, I didn't modified it, I just downloaded, Uploaded in my host and used, I think translator modified it.
Download persian ModernBB


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By Yannick 23 July 2015 12:55

Administrator · 1,453 comments

I've taken a look at the package from that website that claims to be ModernBB 3.7, however, it isn't. It appears that the download on that website is a mixture of files from ModernBB 3.6.0, 3.6.1 and 3.7.0. I recommend you to download ModernBB 3.7 fro mthe official website (http://modernbb.be), and install the translation as described in this topic and follow the instructions as described above. Also, can you tell me how your backup is called (the sql file's name)?


You can do anything

Avatar

By Mohsen_Nirouzad 23 July 2015 13:42

Member · 134 comments

Hi Yannick,
I think I can download modernbb from the official website and translate it myself and post it in this forum,
I can't understand your last sentence, You wanna know my backup name?
my backup name is: modernbb_backup.2015-07-22.sql_2.html
and think you the En-Fa translator, translated modernbb wrong and destroyed it?


Sorry for bad English- I'm an English trainee | Sorry, maybe my codes incomplete or wrong, My PHP is poor ...
My email address

Avatar

By Abdulhalim 23 July 2015 14:48

Member · 59 comments

Hello Yanick ,

I don't know why myself and some other Persian users have problem with Backup/Restore function .
If you notice to my post @ http://forum.getluna.org/viewtopic.php?id=765#p2474 I reported this issue .
I guess you think i modified the forum core , but i didn't do anything with files except CSS file to change direction (ltr to rtl ) and translating English files to Persian .
I tested several version of MBB and Luna , it is OK with Backing up but it can not restore ...

Best regards,
Abdulhalim


Britney Spears Persian Fans | www.Britney.in