Click here to Skip to main content
15,439,556 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Releases · sbpp/sourcebans-pp · GitHub[^]

https://github.com/sbpp/sourcebans-p...1.6.3.Full.zip

The reader
am have installed a localgames server for a online use for csgo
i have install sourcemod in the games server
i have installed my sql as a database for data
i have installed xammp for local web hosting for sourceban++
but when i try putting the php folder in the webfolder(htdocs)

i get 10 to 20 lines for error how do i configure this
am new to php

my configure are
"sourcebans"
{
"driver" "mydriverconnection"
"host" "localhost"
"database" "sourcebans"
"user" "root"
"pass" "somepassword"
//"timeout" "0"
"port" "3306"
}


What I have tried:

$GLOBALS['db'] = ADONewConnection("mysqli://".DB_USER.':'.urlencode(DB_PASS).'@'.DB_HOST.':'.DB_PORT.'/'.DB_NAME);
$GLOBALS['PDO'] = new Database(DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASS, DB_PREFIX);

this 149 and 150 line number in init.php file name
ineed to configure this line
but syntax error
Posted
Updated 5-Nov-20 20:58pm
Comments
Patrice T 6-Nov-20 2:35am    
And you plan to share the exact error messages with us ?
Member 10974007 6-Nov-20 2:39am     CRLF
Warning: Use of undefined constant DB_USER - assumed 'DB_USER' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 149 Warning: Use of undefined constant DB_PASS - assumed 'DB_PASS' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 149 Warning: Use of undefined constant DB_HOST - assumed 'DB_HOST' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 149 Warning: Use of undefined constant DB_PORT - assumed 'DB_PORT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 149 Warning: Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 149 Warning: Use of undefined constant DB_HOST - assumed 'DB_HOST' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 Warning: Use of undefined constant DB_PORT - assumed 'DB_PORT' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 Warning: Use of undefined constant DB_NAME - assumed 'DB_NAME' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 Warning: Use of undefined constant DB_USER - assumed 'DB_USER' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 Warning: Use of undefined constant DB_PASS - assumed 'DB_PASS' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 Warning: Use of undefined constant DB_PREFIX - assumed 'DB_PREFIX' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\init.php on line 150 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known.
Patrice T 6-Nov-20 6:08am     CRLF
Use Improve question to update your question. So that everyone can pay attention to this information.
Member 10974007 6-Nov-20 2:42am     CRLF
https://github.com/sbpp/sourcebans-pp/releases/download/1.6.3/sourcebans-pp-1.6.3.Full.zip download the entire prjoect form here

1 solution

The errors are pretty clear - you are using constant values that aren't defined, and as a result have no value.

Go back to where you got the code and start looking / asking there - we can't fix that for you as we have no idea what the values should be!
 
Share this answer
 
Comments
Member 10974007 6-Nov-20 2:59am     CRLF
https://github.com/sbpp/sourcebans-pp/releases/download/1.6.3/sourcebans-pp-1.6.3.Full.zip download the entire prjoect form here

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900