Advertisement:

Author Topic: SMF tutorials: How to setup a localhost for testing  (Read 33970 times)

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
SMF tutorials: How to setup a localhost for testing
« on: July 18, 2010, 12:36:10 AM »
SMF tutorials:

How to setup a localhost for testing

In this Tutorial you will be learning how to set up a localhost so you can test and practice your PHP without dooming your forum.
Using a locally hosted forum makes editing really easy and fast with no uploading. I will be using Xampp in this tutorial, their are other software's that do the same thing, choose which every is your preference.


1st of all, install the Xampp, this is relatively easy, just follow the on screen instructions and then, if default settings were used you localhost files will be located C:\Xampp\htdocs, we erase (or move to another folder) the current files that are in their. This is where we extract the SMF installer zip file to.



If you don't have Winrar, zips can be extracted without any additional software in Windows (XP or above), whichever method you use, just make sure index.php extracts to the htdocs folder along with the rest of the root files and folders. I recommend leaving the smf installer zip inside htdocs, simply because when your done testing, you can simply extract here again and start a fresh installation easily.

Now, We have the installer files ready its time to setup our database for smf to use, this is simple too. We simply go to phpmyadmin and add an account.

http://localhost/phpmyadmin/ is the default address

Click on Privileges, Click on Add New User. Fill in the Login Information form.





On the Host part, use the drop down menu to select Local.

On the password drop down menu, select Use text field.

Now before creating the account, check the Global privileges area, Click the Check All then click Go in the right bottom corner



Tip: Since were using localhost for testing only, I set my database name the same as the password and user I will use for smf, ordinarily this is a no-no, but since its only local and were testing we can use this, because then we can have Firefox remember the password so every time we use the installer it will remember our database info as well as our smf login information.

Now we got that done, we use the usual method to install smf, We just type localhost in our web browser to start the smf installation process
When we get to the create admin account, providing we saved the login information (using Browser) from logging into database, it should be pretty much filled, all to fill is the confirmation password for the new admin account and the database password. Once we do that were done, we have our forum set up and ready to do all our testing.

SMF 2.0 RC5

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

Offline cicka

  • Sophist Member
  • *****
  • Posts: 1,280
  • Gender: Female
Re: SMF tutorials: How to setup a localhost for testing
« Reply #1 on: July 18, 2010, 09:08:53 AM »
Nice tutorial. Thanks for posting it :)

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #2 on: July 18, 2010, 12:20:41 PM »
Your Welcome,

Not quiet sure where this belongs, maybe their is/should be a tutorial board somewhere in the forum, I think little tutorials to explain little things in small dose's will help out smf users a lot, especially newcomers that overlook the smf online manual

(I made this tutorial myself)

SMF 2.0 RC5

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

Offline cicka

  • Sophist Member
  • *****
  • Posts: 1,280
  • Gender: Female
Re: SMF tutorials: How to setup a localhost for testing
« Reply #3 on: July 18, 2010, 12:21:57 PM »
Your Welcome,

Not quiet sure where this belongs, maybe their is/should be a tutorial board somewhere in the forum, I think little tutorials to explain little things in small dose's will help out smf users a lot, especially newcomers that overlook the smf online manual

(I made this tutorial myself)

Yes, I am sure it will help the new admins a lot.

Offline ~DS~

  • SMF Hero
  • ******
  • Posts: 2,599
  • Gender: Male
Re: SMF tutorials: How to setup a localhost for testing
« Reply #4 on: July 18, 2010, 02:11:55 PM »
I am trying to figure how to make them secure...

Thank you for sharing.

“There is no god, and that’s the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Re: SMF tutorials: How to setup a localhost for testing
« Reply #5 on: July 18, 2010, 02:58:49 PM »
Why are you creating another user ? you can simply use the root user with no password

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #6 on: July 18, 2010, 03:07:23 PM »
Well, for speed, Since we will be erasing and re using the smf installer several times, I had the idea to have the browser remember the password, thus less typing for us, to complete the speedy idea, I though to use the same name in smf, I don't think SMF allows blank passwords, thus we create a password for both.

Using this method it takes me mere seconds to create a complete new forum with new database too

1. Extract Zip over other files
While that's getting done

2. Drop all the tables from the database.

3. Run the SMF installer, almost all the forms are already filled, thanks to Firefox remembering our settings.
Since the SMF admin account and database password are the same, it remembers for both (localhost URL)


I am trying to figure how to make them secure...

Thank you for sharing.
Im not a mac user,thus unsre about 2 of those errors.
You can make the MySQL secure by adding the admin account with a password, you can also add a password to the root account, just to make sure its not throwing that "un-secure" error
« Last Edit: July 18, 2010, 03:15:44 PM by ♪ JohnCcCcCc ♫ »

SMF 2.0 RC5

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

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Re: SMF tutorials: How to setup a localhost for testing
« Reply #7 on: July 18, 2010, 03:20:01 PM »
Well do one installation every 2nd day, and the only thing i change is the user to root, and it that much of work now, is it ?

But your method is fine, but speed , nah!!

And blank passwords are not allowed for users, but Db settings does take blank passwords
« Last Edit: July 18, 2010, 03:51:02 PM by S-Ace »

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #8 on: July 18, 2010, 03:26:41 PM »
Well do one installation every 2nd day, and the only thing i change is the user to root, and it that much of work now, is it ?

But your method is fine, but speed , nah!!

And blank passwords are not allowed for users, Db settings does take blank passwords
Exactly why I create a db account with a password ;)

I make, well try to make mods, and when I do I have to be checking for errors in the log, a lot, since I'm not that good yet, I'm still  a beginner, (take a look at my mods, link in sig) So every time I make a revision to the mod I'm creating, I need to start with a completely clean forum, so every time I fix something, which is usually several times per day, this seems quiet needed.

SMF 2.0 RC5

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

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Re: SMF tutorials: How to setup a localhost for testing
« Reply #9 on: July 18, 2010, 03:31:31 PM »
anyway, at the end of the day getting it done matters, right ?

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #10 on: July 18, 2010, 03:39:21 PM »
anyway, at the end of the day getting it done matters, right ?

I would assume newcomers like me will face the same difficulties, so I may as well help them out.

And yes, its getting done :)

Any better place for this tutorial?

SMF 2.0 RC5

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

Offline sAce

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,992
    • @sbplus_t on Twitter
    • SB+
Re: SMF tutorials: How to setup a localhost for testing
« Reply #11 on: July 18, 2010, 03:50:13 PM »
Two boards can accept this, Install & upgrade or Tips and tricks

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #12 on: August 01, 2010, 01:11:54 PM »
Two boards can accept this, Install & upgrade or Tips and tricks

Request to move to Tips and Tricks then? ...

SMF 2.0 RC5

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

Offline epidemdown

  • Semi-Newbie
  • *
  • Posts: 14
Re: SMF tutorials: How to setup a localhost for testing
« Reply #13 on: September 01, 2010, 07:17:32 AM »
how i go to phpmyadmin

Offline yakyakyak

  • Jr. Member
  • **
  • Posts: 303
  • Gender: Male
Re: SMF tutorials: How to setup a localhost for testing
« Reply #14 on: September 01, 2010, 07:21:19 AM »
Please read the tutorial step-by-step

Every stage is so well documented

Quote
Now, We have the installer files ready its time to setup our database for smf to use, this is simple too. We simply go to phpmyadmin and add an account.

http://localhost/phpmyadmin/ is the default address


Offline Reefie

  • Jr. Member
  • **
  • Posts: 125
    • Reefers UK
Re: SMF tutorials: How to setup a localhost for testing
« Reply #15 on: September 01, 2010, 03:15:23 PM »
simple and effective thanks for sharing

A world without a reef is a world in chaos

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #16 on: September 02, 2010, 12:49:27 AM »
simple and effective thanks for sharing

Thank you, I'm glad this could help you :)

Feedback is welcomed, I'm sure I have documented everything well, if you don't think so, please reply and tell me :)

SMF 2.0 RC5

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

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,297
Re: SMF tutorials: How to setup a localhost for testing
« Reply #17 on: September 06, 2010, 03:10:44 AM »
JohnCcCcCc, did you know in xampp settings you can create a password for the root? Look around, you can find it :)

Offline ɔɔɔɔɔɔuɥoɾ

  • SMF Hero
  • ******
  • Posts: 2,742
  • Gender: Male
  • Community Support Helper SMF forums ftw!
Re: SMF tutorials: How to setup a localhost for testing
« Reply #18 on: September 06, 2010, 11:43:48 AM »
Yes, I know that, but I used this way so I can show members how to create additional accounts also, this way people reading the tutorial can learn more from it ;)

SMF 2.0 RC5

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

Offline lucas-ruroken

  • SMF Hero
  • ******
  • Posts: 4,907
  • Gender: Male
  • Adk Developer
    • lucas.ruroken on Facebook
    • lucasruroken on GitHub
Re: SMF tutorials: How to setup a localhost for testing
« Reply #19 on: September 08, 2010, 09:52:42 PM »
Good tip, I prefer Easy php 2.0 Beta :P
Adk Portal 3.1 is coming....

Design your universe!