Jump to content

WAMP v.s. XAMPP (Two Separate Parts)

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
throese

throese

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
1) WAMP v.s. XAMPP

Which of the two is better to use as a local host testing server?

I have Windows 7 if that makes a difference at all from Windows XP Professional.

WAMP works, but I haven't tried XAMPP.

http://i47.tinypic.com/swfx4z.jpg

As you can see, I have XAMPP's installation file already and I save all of my installation files just in case my computer were to crash or something.

Does anyone know if XAMPP even works on Windows 7?

2) phpMyAdmin

What do I do about the little boxed stuff at the bottom of this screen shot:

http://i47.tinypic.com/25p37yr.jpg

How do I setup the MySQL stuff without screwing up my computer? I messed it up the first time I tried (a few days ago) and had to re-install Windows 7 and most of my programs. Can't remember most of my bookmarks either. Thank you for all the help. Now, I'm going to see if I can help others. =D

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
1: XAMPP is the same as WAMP, just a package designed by Apache's creators (with PERL support) , there should be no difference for dev work.
2: Find your PHPmyAdmin folder within WAMP/XAMPP : somewhere like wamp/phpmyadmin/config.inc.php

And edit the following line: $cfg['Servers'][$i]['password'] = '';

Within the single quotes add a password for root, which you will use to log in to PHPMyAdmin (to disallow access, but all in all it doesn't matter too much as no one will have access to your local network)

How did you mess up your computer by installing WAMP? Personally I've never heard of that or anything near happening, lol.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
throese

throese

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Nullw0rm:

Well, I was going through the process of trying to install/setup MySQL because I wanted it set up. I messed up somewhere so it didn't work. Do you know where I can find a step-by-step guide to installing/setting up MySQL so I can create databases and stuff for the more advanced features of PHP and MySQL?

Thank you.

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
If you installed the WAMP server, and started it up MySQLd is already running. Try using an extremely basic script to connect to your database in PHP, such as:

<?php
$dbhost = 'localhost';       //Keep it as this, as you're running WAMP (local)
$dbuser = 'root';            //Seems familiar? 
$dbpass = 'thepassword';  //Password you set up in the config files (or in PHPMyAdmin), make sure you followed what I said to set it up

//Then we connect, if there is NO error, then MySQL is running and set up!
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to MySQL database'); 

//You'd normally select a database like this, but you didn't create one yet:
//$dbname = 'petstore';
//mysql_select_db($dbname) or die("Cannot connect to database $dbname.");
?>

If that runs fine, then you can do what you wish in PHP, the same as your production server online.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#5
throese

throese

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
So, just add that to the file and it'll create a database?

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
You'd run SQL to create a database:
mysql_query("CREATE DATABASE my_db",$conn);

Maybe you best look at some MySQL tutorials, if you can connect to the database then WAMP is working, you just need to learn some PHP and SQL to do anything with it. :P
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
throese

throese

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
It didn't work, but I'm sure that once I get to the PHP and MySQL examples at PHP Tutorial that I'll find out how. One thing I still don't understand is this example:

PHP Switch Statement

I didn't work, but EVERYTHING else in all the other examples that I've tried does work.

#8
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
Good you're taking it one step at a time. You can post your code here so I could see what is exactly wrong with it, it's not too hard a statement. A quick example of use is this:

$name = "John";
switch($name) {
    case "John":
        print "Your name is John!";
    break;
    case "Jason":
        print "Your name is Jason!";
    break;
    default:
        print "Your name isn't on the list.";
    break;
}
If you're wanting to know a little interesting fact, IF and SWITCH statements are the exact same to PHP's hashtable engine, so if you don't like writing one you can use the other. SWITCH/CASE statements are just more organized in some cases.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#9
throese

throese

    Learning Programmer

  • Members
  • PipPipPip
  • 38 posts
Thanks a lot Nullw0rm! =D