How to :: Installing SMF on your local machine for testing purposes.

Started by Niteblade, June 11, 2007, 09:48:16 PM

Previous topic - Next topic

Niteblade

Purpose
  • This message is directed toward anyone who desires to test their forum on their local computer (the computer you're typing on), rather than creating another forum on your host provider.
  • I'm sure that there is a way that some one could run their forum solely from their own computer using this method, however, this topic will not discuss this possibility.
  • This thread is excellent for (1.) coders, (2.) modders, (3.) theme designers, and (4.) tweakers.

Step One :: Grabbing the necessary software.
For this demonstration, we're going to use XAMPP. The reason we're using this software is because it is free and it contains all the necessary files that will get your forum running on your local machine. Since I'm using Windows, I'll focus on the Windows version.

XAMPP

Personally, I downloaded the Basic version of XAMPP for Windows. The direct link for what I downloaded is here.

Simple Machines Forum -- Full install.
  • Download the Full install version of SMF from here.

Step Two :: Extraction
  • Extract the contents of XAMPP to the "C:\xampp" directory.
    Note :: Inside the "C:\xampp" directory, there should be several subdirectories ... A few of them are: "C:\xampp\anonymous"; "C:\xampp\apache"; "C:\xampp\cgi-bin";
  • Extract the contents of the forum software package into "C:\xampp\htdocs\forum". After extraction, there should be several sub-directories here as well ... a few of them are: "C:\xampp\htdocs\forum\attachments"; "C:\xampp\htdocs\forum\avatars"; "C:\xampp\htdocs\forum\Packages";
  • !!! Whatever script that you're running must be inside the \htdocs directory for it to run on your local machine !!!

Step Three :: Starting XAMPP & Creating a database
  • Inside the "C:\xampp" folder, there will be a file named : xampp-control.exe. -- Run that.
  • When the program runs, a window will open. Click on the button that will Start apache; click on the button that will start mysql.
  • Next, open up your internet browser.
  • Go to the web address "http://localhost"
  • The XAMPP screen will open. Select your language.
  • Now, on the left of the screen, there will be a navigation menu. Underneath the heading "Tools" you'll see a link to phpMyAdmin. -- Click on phpMyAdmin.
  • You'll be taken to the first menu of phpMyAdmin. -- On this inital screen, create a database. Name that database smf.
  • Underneath the part where you name your database, you can specify what kind of database it is ... I selected "utf8_bin" ...

Step Four :: Installing SMF
We're ready to load up the forum !!
  • Using your internet browser, go to "http://localhost/forum"
  • You should see the SMF installer at this point.
  • Input all the information. The database name is smf and the username that can access that database is root.
  • No password is required.

Done.
affiliate blog

Niteblade

Will someone type up something on how to export an existing database using phpmyadmin and importing it to the local machine?

I'm sure there will be some settings that will have to change for SMF to run on the local machine after a database import, though. This would be excellent for those who want to install tweaks and features to their existing forum without doing something that will bring the live and active internet forum down.
affiliate blog

Dragooon

I didnt get your second post question but If you have phpMyAdmin in XamPP then I can tell.
Personally I use EasyPHP as it has latest versions of PHP,MySQL,Apache and PHPMYADMIN.
I never used XamPP so it may differ.
To download your database go to phpMyAdmin of your main forum and go to export.Then select all tables and click on Save File down below then click Go.
Now after Download finishes it will be on your computer.
Then go to the PHPMyadmin of your localhost and click on Import and import the select the .sql file you Downloaded.
Once your Database is there I am not sure but you may be needing to run repair_settings.php to fix paths,Database settings.
That is how I did it on EasyPHP but I dont know of XamPP
http://www.easyphp.org/telechargements.php3 is where you can Download easyphp.

dakotaroar

Once installed, XamPP vs. EasyPHP should not matter.

If you're a Mac user, I've had great luck with Marc Liyange's PHP Apache Module and MySQL Database Server.

http://www.entropy.ch/software/macosx/
The only forum for students in North and South Dakota!  Campus Dakota.

Niteblade

Ah, good.

100 230 586 1006 views and not one person is complaining that their computer burst into flames.
affiliate blog

Dragooon

LOL
Mine computer didnt burst into flames it was just that I crashed my windows and why?
I deleted the Windows folder.

me123

Can I also test my running forum (1.1.2), which is online? I made a lot of modifications in it. (via trial and error)

I want to test if some mods/upgrades (like 1.1.3) work on my active forum. I am afraid to do this on my live forum, as when I mess up, I do not know how to restore...
Your tutorial (above) only describes how to setup a test server with a new and clean intall of smf.

Harro

Then you'll have to download a backup and restore it locally.
Take a look at Saving/Restoring, and Moving SMF From a Host to Another for info on  how to do that.

me123

I did exactly as you told. Getting the following error when trying to import the forum backup file:



Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unknown Punctuation String @ 2
STR: :\
SQL: G:\Download\*******-complete_2007-07-03.sql.gz


SQL query:

G:\Download\*******-complete_2007-07-03.sql.gz

MySQL said: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'G:\Download\*******-complete_2007-07-03.sql.gz' at line 1

me123

ok, I have made the dump file without .gz compression.
Importing in the database ASCII, not UT8....

That worked.
However, now I cannot login... and when I register I do not receive a registration email...
How can I login as an administrator???

Harro


HoTmetal


me123

Is my PC vulnerable from the outside when running a server as descibed above?

p.s. It is all working now!

Harro

If you just install it the security isn't optimal.
You'll have to change a few things (but I don't know what :P )

babjusi


me123

I am running a test forum now on my local machine. I am unable to login as an administrator...
I keep getting this error:

Your email address needs to be validated before you can login. Need another activation email?

I am running XAMPP. In the message window I see: Current directory: c:\xampp
Install Directory:
*** WARNING: Directory mismatch ***
Status Check OK


What am I doing wrong... I cannot enter my test forum...(anymore, it used to work though...)





Harro

You  just have to activate your account.
I don't think you xampp can send emails.
So go to your database with phpmyadmin and active your account there manually.

me123

Quote from: Harro on July 31, 2007, 06:10:01 AM
You  just have to activate your account.
I don't think you xampp can send emails.
So go to your database with phpmyadmin and active your account there manually.

I did that without result.
My solution:I reinstalled Xampp, and SMF 1.1.3. Et voila, it is working again.....

L.G.S

I got as far as installing SMF.

I made a database called smf.

Fill out database name = smf

database password = root

mysql username = smf

table prefix = smf_

then I get a wrong user/login error.
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Niteblade

Quote from: L.G.S on August 02, 2007, 08:23:27 PM
I got as far as installing SMF.

I made a database called smf.

Fill out database name = smf

database password = root

mysql username = smf

table prefix = smf_

then I get a wrong user/login error.

Quote
Step Four :: Installing SMF
We're ready to load up the forum !!
  • Using your internet browser, go to "http://localhost/forum"
  • You should see the SMF installer at this point.
  • Input all the information. The database name is smf and the username that can access that database is root.
  • No password is required.

No password is required for the database. Only the username, root, is required. Try that.

Attempt to edit /Settings.php and look for

########## Database Info ##########
affiliate blog

karlbenson

I recommend Xampp lite over Xampp.

You don't need anything more than whats in lite for testing smf and any other script.
PHP/MYSQL and your set. (a good editor is also useful, I recommend Notepad++)

KensonPlays


Owner of Mesozoic Haven

KensonPlays

One thing: How do you install it so others on a network can access it?

Or my house is a half block away and I want my family to access it, I am at my grandparents a half block away. Thanks!

Owner of Mesozoic Haven

Advertisement: