ztizzlegaming / CSGOWinBig

Open-source Counter-Strike: Global Offensive jackpot betting website.
MIT License
169 stars 104 forks source link

Importing Database Error #189

Open XPownage opened 8 years ago

XPownage commented 8 years ago

When I tired to import the mysql database I got this error.

SQL query:

CREATE TABLE IF NOT EXISTS chat(

id INT( 11 ) NOT NULL AUTO_INCREMENT , steamUserID BIGINT( 11 ) NOT NULL , text TEXT COLLATE latin1_general_ci NOT NULL , date TEXT COLLATE latin1_general_ci NOT NULL , time TEXT COLLATE latin1_general_ci NOT NULL , PRIMARY KEY ( id ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

MySQL said: Documentation

1115 - Unknown character set: 'utf8mb4'

XPownage commented 8 years ago

Ok, I fixed that problem but I cant get the site to connect to the database... Where do I want to put the password.txt folder... Like on centos when it shows /../password.txt where does it actually look?

andrewda commented 8 years ago

Well, it's in the directory directly outside of the directory storing the code. For example, if your code is located at ~/public_html/, then your passwords.txt goes in the ~ directory (also known as your "home" directory).

@ztizzlegaming - just a suggestion, you should make a passwords.php file instead of a passwords.txt, as it could simply be located inside of your website without any issues. Just require the passwords.php file and you have access to all the passwords, but a client accessing http://yoursite.com/passwords.php would not, unless they're echo'd, which obviously they wouldn't be.

XPownage commented 8 years ago

So it should be stored here correct? http://s23.postimg.org/icggfsux7/Untitled.png

XPownage commented 8 years ago

@andrewda

andrewda commented 8 years ago

I believe that is correct.

XPownage commented 8 years ago

@andrewda I tried it and it still doesn't work... Here is the website, http://www.spongenetwork.tk I have yet to change the domain or anything on the website yet. Just trying to get the database connected before I do anything else if your curious. So its looking for the password.txt with this code, $fileLoc = $_SERVER['DOCUMENT_ROOT'] . '/../passwords.txt';

Also the password.txt has this in it
{"default-password":"WherePasswordWouldBe","steamAPIKey":"SteamAPIKey"}

Is that what it should be?

XPownage commented 8 years ago

@andrewda Hello?

XPownage commented 8 years ago

Can I get help setting up the site? @andrewda

andrewda commented 8 years ago

Ok, well I'll need you to show me some PHP errors to be able to help you out.

XPownage commented 8 years ago

@andrewda So this is the error I'm getting atm.
[Wed Mar 16 18:01:14 2016] [error] [client (Nope)] PHP Fatal error: Call to a member function query() on a non-object in /var/www/html/php/login-status.php on line 36, referer: http://199.168.96.138/

The line of code is $stmt = $db->query('SELECT * FROM history');

scottrot1 commented 8 years ago

I am getting the same error, if anyone knows a fix, it would be greatly appriciated.

enizunic93 commented 8 years ago

add me on steam i can help you: /id/enizunic93 Comment on profile why you added me.

scottrot1 commented 8 years ago

Is there anyone who can help without charging?