Chat2: Group Chat Room
# December 3, 2012 at 11:04 am
Hello and Greetings,
My name is Timothy. I am a barely competent web programmer, and learning a lot from this site.
I want to get the “Chat2: Group Chat Room” going on my website, but I’m having challenges I can’t resolve.
I uploaded and extracted all the files given in the demo to my website. And when I go to test, I input my username, and then receive a “Could not connect” on the follow-up page.
What did I not do? What do I need to do?
Timothy# December 3, 2012 at 11:18 pm
Please forgive me and my incompetence.
How do I configure dbcon.php? Do I manually create the database chat2_db? And how do I use Setup.sql to add the tables?
I attempted to create my own database and insert its name into the files, but it failed.
I swear I am reasonably intelligent, I just don’t know exactly what you’re talking about.# December 4, 2012 at 6:05 pm
This reply has been reported for inappropriate content.
dbcon.php needs to know how to access your MySQL database. On my laptop, for example, I have apache, php and a mysql setup for localhost connections. My login name is, naturally, “example” and my password is “3x4mpl3_p4ssw0rd”. Someone told me once that it was smart to use letters and numbers, and I have been ever since. The top of dbcon.php therefore looks like:
To set up the database, go into MySQL and create the database:
CREATE DATABASE chat2_db;
To execute Setup.sql, navigate in the terminal to the directory with Setup.sql in, then execute the following:
mysql -u example -p chat_db < Setup.sql
Remember that example is my username, not yours, and you might need to put something else in. You will be prompted for your password.
Alternatively, I’m sure PHPMyAdmin will have a nice interface for all of this.
You must be logged in to reply to this topic.