News:

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

Main Menu

Reinstalling SMF 2.0 (Want to use existing database)

Started by Ben_Cole, May 20, 2009, 12:49:31 PM

Previous topic - Next topic

Ben_Cole

Hello,

I have searched and searched and have turned to this as my last resort, Recently the web files were deleted accidently but the database is still there, we have to reinstall SMF which is a pain and I need to know how to use the existing database without having to start a fresh. (Please note I also installed one packaged "Stars and Badges").

I'd appreciate any help regarding this.

Cheers,

Ben

babjusi

Quote from: Ben_Cole on May 20, 2009, 12:49:31 PM
Hello,

I have searched and searched and have turned to this as my last resort, Recently the web files were deleted accidently but the database is still there, we have to reinstall SMF which is a pain and I need to know how to use the existing database without having to start a fresh. (Please note I also installed one packaged "Stars and Badges").

I'd appreciate any help regarding this.

Cheers,

Ben

Simply upload all the files from the install package, in the same directory where your forum used to be, then run the repair_settings.php file and fill in the db info of (of the db that your forum resided on) and you should be all set.

Ben_Cole

Thankyou, although I now get the following error:

QuoteParse error: syntax error, unexpected '}' in /home/tufr/public_html/lspd/Settings.php on line 62

babjusi

Quote from: Ben_Cole on May 21, 2009, 09:29:41 AM
Thankyou, although I now get the following error:

QuoteParse error: syntax error, unexpected '}' in /home/tufr/public_html/lspd/Settings.php on line 62

Can you post here the codes around line 62?

Ben_Cole

Quoteheader('Location: http' . (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 's' : '') . '://' . (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] . (empty($_SERVER['SERVER_PORT']) || $_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']) : $_SERVER['HTTP_HOST']) . (strtr(dirname($_SERVER['PHP_SELF']), '\\', '/') == '/' ? '' : strtr(dirname($_SERVER['PHP_SELF']), '\\', '/')) . '/install.php'); exit;

}

babjusi

I don''t see anything wrong with the above code.

Do you have the start of the if structure in lines 61 and 62?

if (file_exists(dirname(__FILE__) . '/install.php'))
{

Ben_Cole

Quote from: babjusi on May 21, 2009, 09:43:18 AM
I don''t see anything wrong with the above code.

Do you have the start of the if structure in lines 61 and 62?

if (file_exists(dirname(__FILE__) . '/install.php'))
{

Cant find it

babjusi

Quote from: Ben_Cole on May 21, 2009, 09:49:19 AM
Quote from: babjusi on May 21, 2009, 09:43:18 AM
I don''t see anything wrong with the above code.

Do you have the start of the if structure in lines 61 and 62?

if (file_exists(dirname(__FILE__) . '/install.php'))
{

Cant find it

Try to add it and see if it would help. Or overwrite it again with a fresh copy from the install package and then recreate it once again with the repair_settings.php file.

Ben_Cole

I've got

QuoteTable 'lspd.smf_settings' doesn't exist

babjusi

Quote from: Ben_Cole on May 22, 2009, 12:10:30 PM
I've got

QuoteTable 'lspd.smf_settings' doesn't exist

That is cos you are missing the settings table in the database.

PH0ENlX

Ok i got the same problem like you. Error on Line 62.

Aaaand i got it fixed.

You do following misstake...

1. upload your settings.php again on FTP
2. DON'T use repair_setting.php
    (this file is trying to change your settings.php and brings you the problem)
3. run the normal install.php
4. fill in all informations it need
5. use another username at the admin datas (you can delete it later and use your old adminprofile when you still know your login,
when not change the passwort before you delete the account)
6. install.php install your smf again on your database and override the files it need
7. the important things like users, topics, posts and so on will not be overwrited

Trust me it works.
Our forum is now normal back on.

magicbaz

#11
I have just deleted the old forum folder, don't ask!, anyway, i have installed the new version of the forum, i have set up the old database etc is there anyway i can get all the old database settings running on teh new forum. I have used repair_settings.php but it still looks like a new installation ie no members etc. I have tried all the above but no joy. any ideas?

TheDisturbedOne

Delete the new database and restore the old database in phpMYadmin.
How do I restore the database data?
Then run repair_settings.What is repair_settings.php?

Aleksi "Lex" Kilpinen

Hi Ben_Cole, did you get things working - or do you still need assistance on this? :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Ben_Cole

Quote from: LexArma on July 08, 2009, 06:26:16 AM
Hi Ben_Cole, did you get things working - or do you still need assistance on this? :)

I just did a total wipe :P

JimM

I'll go ahead and mark this one as solved.  If you need to unmark it, please do so.
Jim "JimM" Moore
Former Support Specialist

Advertisement: