For some reason I have it setup, but when I go to login it doesn't connect to my database due to it not using the last number of the IP I put in the config.php
The welcome screen works fine, it is just when I go to register or user login I get the below error. You can see in the error message the @IP address is missing the 8 at the end, however it is there in my config. I'm at a loss any idea?
(I changed the HOST IP, User, password etc. for this example, but this is my issue.)
DB Connection Failed: SQLSTATE[28000] [1045] Access denied for user 'Whatever'@'192.254.286.12' (using password: YES)
if (!defined('DB_HOST')) define('DB_HOST', '192.254.286.128'); Not actuall IP, but example
if (!defined('DB_USER')) define('DB_USER', 'Whatever');
if (!defined('DB_PASS')) define('DB_PASS', 'sure');
if (!defined('DB_NAME')) define('DB_NAME', 'Whatever_4162');
if (!defined('DB_HOST')) define('DB_HOST', '192.254.286.128');
should do it - but your saying on the error your getting it's dropped the last digit? That's very odd...
Let's hard code it then!
Open the LIB folder , and CORE.PHP
find
protected function connect() {
/**
* Try and connect to the database, this information can be
* configured in the inc/config.php file do not change them here.
*/
try { $this->db = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';', DB_USER, DB_PASS);
} catch (PDOException $e) {
// Kill the application as the connection to the database failed.
die('DB Connection Failed: ' . $e->getMessage());
}
Edit this bold line to look like the following (but obviously change for your correct information)
Note: The standard MYSQL port is 3306 , but people like vilayer enjoy changing that up for no good reason.
new PDO('mysql:dbname=epoch;host=192.254.286.128;port=3306', 'username', 'password');
$this->db = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME.';', DB_USER, DB_PASS);
to
new PDO('mysql:dbname=epoch;host=192.254.286.128;port=3306', 'username', 'password'); (Except I put in my information)
I still is dropping the last number. 192.254.286.12 should be 192.254.286.128.
Sweet that worked, up and running. Thanks for the awesome program!
One last question when I register and go to my email to verify the account I get the below link in the email which is missing a "/" after the domain name and before the verify_account.php. Which file can I edit that in?
Also if you don't mind me asking, on the Build-O-Base page I would like to change the helicopters which they can purchase. Not very familiar with PHP, but which file would that be located in. Tried looking through them, but didn't have any luck.
that missing / is in your INC folder and Config.php under
////////////MODIFY THIS SECTION //////////////////
// REMEMBER TRAILING SLASH >> /
if (!defined('DOMAIN_NAME')) define('DOMAIN_NAME', 'http://es-gamers.com/donators/');
you forgot the trailing slash.. even though we said REMEMBER THE TRAILING SLASH
and the helis are in the root folder, under Config.php
$coinsforhelicopteritem = "10"; // Helicopter Option in the Build-O-Base
//Helicopter Items are listed here in the Options//
$buildobase4 = "<select name='part'>
<option value='AW159_Lynx_BAF'>AH-11 WildCat</option>
<option value='BAF_Merlin_HC3_D'>Merlin HC3</option>
<option value=’Ka60_GL_PMC'>KA60 with Grenade Launcher</option>
</select>";
yes you do - some sort of e-mail server is required.
Minimum PHP Version: 3.3.X
To check this create a blank document on the server you are
installing it on and name it test.php. Copy the following contents
to the file...
<?php
echo phpversion();
?>
Open the page and you will see the version of php you have
remember you are looking for version 3.3.x of higher!
Next...
We have to ensure you have PDO extension enabled and PDO MYSQL
driver installed. To do this open up the test.php file we just
created and add this:
<?php
phpinfo();
?>
Open the page in the browser and hit CMD + F (Mac) or CTRL + F
(Windows/Linux) type in PDO and look for the following:
PDO DRIVERS: mysql
If you see this your all set! should be able to install the
application without a problem.
im trying to host this on es-gamer but tbh mate, ive never used any of this software b4 and im struggiling to find a decent guide on how to get this running, any chance of a small idiots guide?
there is a PDF included that covers the basics- but if yours is the account I think it is, you have a port included inside the INC/Config.php - this file does not need to have a port , just the IP
12.12.12.12:3306 <---- wrong 12.12.12.12 <--- right
this only applies to the settings that point to the web server - anything that points to a game server requires a port
Ok this is what ive got going on, im getting the error - DB Connection Failed: SQLSTATE[HY000] [1130] Host 'ecres148.servconfig.com' is not allowed to connect to this MySQL server
i have created a new user on xammp, but still i cannot connect.
thanks for your help man, im loosing it here,,,,lol
So how would I go about adding and changing the loadouts and such? I see there are numbers at the end and I dont know why, Can I use a loadout generator? What can I do?
use the item class name , and the numbers correspond to the number of items IE:
grenade 9mm beans 1, 2, 3, one grenade, two 9mm mags and 3 cans of beans
Error Can't connect to MySQL server on '216.231.140.62' (111)
I can create a user account login add my player id. But anytime I try to buy or any player edits I get the error above. Like it wont connect to my Game SQL database.
What is weird, I can see Top Zombie Killers Bandits all the Top List has the players names. But When I click view player stats, or try to modify anything. It gives me "Error Can't connect to MySQL server on '216.231.140.62' (111)"
Hey there MassAsster!
Been using this since you originally dropped it on us and it's been a real "Asset" to the community. But now, with the Steam PID changes (becoming a larger number) it seems to freak out your code a bit and say that players do not exist when clicking my own stats, but you can see all player stats under "player stats". Any ideas on this problem kind sir would be greatly appreciated.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.