I was installing a travian script on localhost xammp, and i got a lot of errors.
four of them are notices that are supposed to have held the mysql information. “Use of undefined constant SQL_USE”
did those four errors happen because global registers were off? or does have nothing to do with this?
okay so there is a filed inside GameEngine that config.php.
this file, the current file that is being executed, calls to config.php and config.php contains the following.
// ***** Database Username
define("SQL_USER", "root");
// ***** Database Password
define("SQL_PASS", "sergfree");
// ***** Database Name
define("SQL_DB", "trav");
// ***** Database - Table Prefix
define("TB_PREFIX", "s1_");
this is the include
include ("../../GameEngine/config.php");
this is the current file location C:\xampp\htdocs\install\include\multihunter.php
so why doesn’t this work?
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
Notice: Use of undefined constant DB_TYPE - assumed 'DB_TYPE' in C:\xampp\htdocs\GameEngine\Database.php on line 13
Notice: Use of undefined constant SQL_SERVER - assumed 'SQL_SERVER' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Notice: Use of undefined constant SQL_USER - assumed 'SQL_USER' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Notice: Use of undefined constant SQL_PASS - assumed 'SQL_PASS' in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (trying to connect via tcp://SQL_SERVER:3306) in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\GameEngine\Database\db_MYSQL.php on line 17
php_network_getaddresses: getaddrinfo failed: No such host is known.
Probably you forgot to include a config file where the SQL_ defines are done.
Based on your edit, UNCOMMENT those define lines: