restore backup

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

restore backup

Post by paul14 »

I did a backup with the admin tool but when I tried to restore it from the same admin section, I got the message that is seems not to be a phpmyfaq database. So I am unable to restore my faq.

What to do.

I am using 1.4.7 http://braingym.free.fr/FAQ/


Thanks,
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which browser did you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

I am using Firefox 1.0.1 on Linux

Paul
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

is it possible to add the following line of code in the file admin/backup.import.php:

Code: Select all

if ($permission["restore"]) {
// add this line:
print 'file type: '.$_FILES["userfile"]["type"];
// end
Then try an import and post the returning message here. Thanks!!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

I was not sure were to put the lines, I did it at the begining. The result:

Parse error: parse error, unexpected $ in /var/www/free.fr/8/0/braingym/FAQ/admin/backup.import.php on line 82
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

when you added this in the first line, please remove the following

Code: Select all

if ($permission["restore"]) { 
and try it again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

file type: text/x-sql

And: "this seem not to be a phpfaq backup file" in french : Ca ne semble pas être une sauvegarde de phpmyfaq.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

okay, that's the problem...

Here's the solution:

You'l find this line in admin/backup.import.php:

Code: Select all

if (isset($_FILES["userfile"]["type"]) && ($_FILES["userfile"]["type"] == "application/octet-stream" || $_FILES["userfile"]["type"] == "text/plain")) {
Please change it to:

Code: Select all

if (isset($_FILES["userfile"]["type"]) && ($_FILES["userfile"]["type"] == "application/octet-stream" || $_FILES["userfile"]["type"] == "text/plain" || $_FILES["userfile"]["type"] == "text/x-sql")) {
Then it sould work!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

Dear Thorsten,

you are a magician, THANKS A LOT.

Your program is wonderful and your help is incredible.

Congratulation.

Paul
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Paul,

no problem!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

Sorry to come back,

I did restore (and migrate to another ISP) everytink work exept I cannot write articles or news as admin. I wonder what I did wrong. Users can still go on the FAQ and ask questions, but I cannot answer to it.

Thanks.
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Paul,

any error messages?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

None,

I edit an article or a news as usual, everythink work, phpfaq said that the article is writen "article enregistré", but nothing happen in the FAQ.

Howhever I can delete a news and it disapear trom the faq.


Paul
Thorsten
Posts: 15724
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this is strange... do you have write access to the database?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
paul14
Posts: 8
Joined: Thu Mar 31, 2005 8:10 am
Location: France
Contact:

Post by paul14 »

Thanks again Thorsen.

I order to make it works, I had to CHMOD 777 to the backup before upload it to phpmyFAQ.

Now everythink works perfect.

Thanks for helping,


Paul from France
Post Reply