• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Manual MySQL Database Entry

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
4 posts • Page 1 of 1

Postby MyCuriousBrain » Sun Jul 17, 2011 10:50 pm

I am using the phpfreechat v1.3 plugin on WordPress v3.2.1 and really enjoy having this feature on my website. My question revolves around some code in chat.php. This section here:

Code: Select all
if ($options['method'] == 'mysql') {
         $params["container_type"] = "mysql";
         $params["container_cfg_mysql_host"]     = DB_HOST;                     // default value is "localhost"
         $params["container_cfg_mysql_port"]     = '3306';                     // default value is 3306
         $params["container_cfg_mysql_database"] = DB_NAME;                     // default value is "phpfreechat"
         $params["container_cfg_mysql_table"]    = $table_prefix . 'phpfreechat';   // default value is "phpfreechat"
         $params["container_cfg_mysql_username"] = DB_USER;                     // default value is "root"
         $params["container_cfg_mysql_password"] = DB_PASSWORD;                  // default value is ""
      } else {

Could someone demonstrate the correct way to enter my database information in here manually please? Without giving away any private information of course...

Thanks!

~CB :cool:
Hey! At least I am house trained! ~TheDude
MyCuriousBrain
New member
 
Posts: 8
Joined: Thu Jul 14, 2011 7:44 pm
Location: Slightly Left of Center
  • Website
Top

Postby re*s.t.a.r.s.*2 » Sun Jul 17, 2011 11:00 pm

hi,

We don't support non official PFC related questions but here it goes..

Code: Select all
$params["container_type"] = "mysql";
           
$params["container_cfg_mysql_host"]     = "localhost";  // default value is"localhost"
$params["container_cfg_mysql_port"]     = '3306';  // default value is 3306
$params["container_cfg_mysql_database"] = "phpfreechat"; // default value is "phpfreechat"
$params["container_cfg_mysql_table"]    ="phpfreechat"; // default value is"phpfreechat"
$params["container_cfg_mysql_username"] = "myCuriousBrain"; // default value is "root"
$params["container_cfg_mysql_password"] = "123456";

My understanding is that you don't want to use your Wordpress database information but to make another mysql user and database all along correct?.

hope this clear up some clouds..
regards.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby MyCuriousBrain » Sun Jul 17, 2011 11:15 pm

Thanks! I appreciate your help. :D

Two questions though. The first question is about this code here:

Code: Select all
$params["container_cfg_mysql_table"]    = $table_prefix . 'phpfreechat';   // default value is "phpfreechat"

I noticed that you removed the small section $table_prefix. from that line. Why is that? Also...

The second question I had was about the values entered. I noticed that the port value was surrounded with the single quote mark like '3306'. All the other values seem to have the double quotes like "3306". Which is the correct way? Does it matter?

Thanks again!

~CB :cool:
Hey! At least I am house trained! ~TheDude
MyCuriousBrain
New member
 
Posts: 8
Joined: Thu Jul 14, 2011 7:44 pm
Location: Slightly Left of Center
  • Website
Top

Postby re*s.t.a.r.s.*2 » Mon Jul 18, 2011 12:55 am

hi,

I changed that because you say you wanted to have it manually , if that so you dont need the variable there since you will not use it...

you can put whatever string there PFC will create the table with that name...

and for the single quote and double quotes, matters only if you want to php to parse the content of the php var..

It will the content of the var if used with the double quote, if you use single it will use the var as another text string it will not read the content of var..

like so:

$mycontent= "this is a var"; //set a variable with something.


$var= "$mycontent"; // $var will have "this is a var"

if use single


$var = '$mycontent'; // $var will have "$mycontent" and not the string you set previously.


regards..
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 27 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub