News:

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

Main Menu

SMF tutorials: How to setup a localhost for testing

Started by ɔɔɔɔɔɔuɥoɾ, July 18, 2010, 12:36:10 AM

Previous topic - Next topic

KensonPlays

Ok, I kept "root" and changed password, because it is faster to type "root" rather than "kcmartz" or "administrator".

Owner of Mesozoic Haven

ɔɔɔɔɔɔuɥoɾ

The add user was intended for learning purposes, also, for testing, you can set your smf pass and username the same and have your browser remember it, Read a few posts up, I already explained this, the quickest way to set up a forum from scratch.

I have managed to do it in less than 10 seconds ;)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

KensonPlays

Install a whole SMF? wow. It takes me around 2-3 minutes!
Both localhost, and a live site!

Owner of Mesozoic Haven

ɔɔɔɔɔɔuɥoɾ

See, I don't post this information for nothing, it all has a purpose, you just need to read "all" the details, in 1st post and replies.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

KensonPlays

... i read them. i was just stating that.

lets GET BACK on TOPIC now ok?

Owner of Mesozoic Haven

ɔɔɔɔɔɔuɥoɾ

Quote from: Kcmartz on September 09, 2010, 01:12:33 PM
... i read them. i was just stating that.

lets GET BACK on TOPIC now ok?

Actually we're still on topic for the most part, but if it was off it would be you needing to get back on topic :P


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Kat9119

I'm using XAMPP and I have gotten fresh installs to work. But I really need an exact copy of the one I'm currently using.

I tried to just copy all files and put it in the directory I'm supposed to. But I can't do that because #1 all the database data is different and #2 there is no install file. There might be more issues too but I'm not sure.

So, how do I exactly go about doing this?

ɔɔɔɔɔɔuɥoɾ

Well, you will need to transfer your database to your local host also you can make a backup from your online forum using phpmyadmin, then simply import that into your localhost also using phpmyadmin.
Everything should go well if you download your forum files and place them into the directory where you want your forum.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

Kat9119

Quote from: ɔɔɔɔɔɔuɥoɾ on October 09, 2010, 03:33:09 PM
Well, you will need to transfer your database to your local host also you can make a backup from your online forum using phpmyadmin, then simply import that into your localhost also using phpmyadmin.
Everything should go well if you download your forum files and place them into the directory where you want your forum.

Thats what I was thinking. Am I going to have issues with the database name and username/password in the SMF files vs the local database?

xenovanis

You can import the database in phpMyAdmin. Just setup a new database, you can use the same name if you want.

After restoring the database, run repair_settings to set up a connection to it and to restore the paths and urls.

What is repair_settings.php?
"Insanity: doing the same thing over and over again and expecting different results."

Kat9119

Ok, when I go into the phpMyAdmin of my localhost, I click on the database I want, and choose to import. I upload my real database...but it never actually uploads? All it says in the bar at the bottom is "sending request to localhost" and nothing ever happens....

Kat9119

Ok, turns out the database I guess was too big at 40mb, so I zipped it and was able to import it this time.

I named my database the same name as my live forum, added all my backed up files, and ran repair_settings.php I still get a Connection error:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

The paths and URLs are set & the username is root and no password database name is the same as the old one and same as the one I just set up...

I do notice if I go into the local phpmyadmin there are only 61 tables instead of 70 something on my live site.

Any suggestions on something I could be doing wrong?

xenovanis

Are you sure your database name is the same? On hosting packages, databases usually have a prefix which they don't specifically have on your localhost.

If your database is too large to import through phpmyadmin, you can use the source command to import the database:
Copy the database sql file to the /xampp/mysql/bin directory
Windows -> Start -> Execute -> cmd
Go to the mysql bin directory using cd commands (like cd xampp -> cd mysql -> cd bin)
Enter commend: mysql -u root -p
Enter command: connect {database}  (database name here)
Enter command: source (databasebackup.sql} (filename of the backup here)
"Insanity: doing the same thing over and over again and expecting different results."

Kat9119

#33
Yup, my database is NAME_NAME and so when I made the new one I just copy and pasted it into the local phpmyadmin (and double checked it was right on my live forum) and when I did the repair settings I made sure it was the same as well, it auto filled out my old password and username, and I'm guessing since its all local I would just input the "root" as user and no password, When I leave it auto filled out it gives me an error that the SQL info isn't correct.

Could it have something to do with the fact that Flashchat & coppermine are integrated but I haven't put up databases for those? I'm not interested in having those in the test area anyhow

I notice that the following tables are missing as well:
smf_message_icons
smf_moderators
smf_ob_googlebot_stats
smf_package_servers
smf_permissions
smf_personal_messages
smf_pm_recipients
smf_polls
smf_poll_choices
smf_sessions
smf_settings
smf_smileys
smf_themes
smf_topics
smf_xlinks

xenovanis

Well, that should work then. No idea why it's not working. Unless the most essential tables from your database are missing.

After saving repair_settings the first time, where you corrected the mysql settings, at the bottom of the page, were there more links to correct? If SMF can't find the database, repair_settings will only show the fields for the mySQL info and the path and url to your forum. If the MySQL information is entered correct, after saving, additional fields for avatars, attachments and themes paths and url's will should appear.
"Insanity: doing the same thing over and over again and expecting different results."

Kat9119

Whoops, updated my above post with more info.

There are three links to correct, the forum url, forum directory and sources directory, thats all that shows at the bottom. But there are no errors showing on the page

xenovanis

Weel, before trying to connect, you should import the database properly. The settings table is a keytable, without that your forum won't function anyway.
See my previous post on using the source command:
http://www.simplemachines.org/community/index.php?topic=391328.msg2814098#msg2814098
"Insanity: doing the same thing over and over again and expecting different results."

Kat9119

#37
I went in, selected the missing tables, and exported them then imported them. When I saw that was one of the missing tables I figured that was my issue. Repair settings does work.

However, now I have a new problem LOL. As soon as I get into the forum it tells me I'm banned. I'm guessing I need to edit a table to fix this issue, but I'm not quite sure what I'm doing. I'm gonna attempt to just delete the ban table, and hope that works. I guess I can always import it again if not lol

Thank you for your help. I'm learning a lot though :)

xenovanis

Using source is cool though. You get all these lines running in your screen, like in DOS :)

Since it's your local host, you could truncate the smf_ban_items table. This should clear all bans.
"Insanity: doing the same thing over and over again and expecting different results."

Kat9119

Quote from: xenovanis on October 10, 2010, 02:57:44 PM
Using source is cool though. You get all these lines running in your screen, like in DOS :)

Since it's your local host, you could truncate the smf_ban_items table. This should clear all bans.

Hum, Not sure what you mean. I emptied both ban tables, then tried again...couldn't get in. Then I dropped both tables, and couldn't get in...

Advertisement: