yi12345 / TravianZ

travian t3.6 project (based on travianx v6.0.0)
183 stars 190 forks source link

Deprecated: mysql_connect() #480

Open japetos opened 8 years ago

japetos commented 8 years ago

Hello,

by trying to install MySQL tables, following messages appears:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /customers/3/7/6/domain.net/httpd.www/t4/install/include/database.php on line 30 Warning: Cannot modify header information - headers already sent by (output started at /customers/3/7/6/domain.net/httpd.www/t4/install/include/database.php:30) in /customers/3/7/6/domain.net/httpd.www/t4/install/process.php on line 132

Even though I configured MySQLi, it allways tries to connect to DB via mysql_connect()

oroalej commented 8 years ago

change that code to

mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB);

and comment out this:

//mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS);
// mysql_select_db(SQL_DB);
Shadowss commented 8 years ago

Why you insist and you don`t use last updated source ?

https://github.com/Shadowss/TravianZ

japetos commented 8 years ago

as ists the same issue

Shadowss commented 8 years ago

USE MYSQL !!!

japetos commented 8 years ago

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead .......

oroalej commented 8 years ago

dude. PHP 5.6+ is not compatible with this game, because the code is outdated. if you want to, you can use lower version of php..

japetos commented 8 years ago

don't want to ;)

oroalej commented 8 years ago

You don't have a choice, it's either use 5.6 lower or update the code :D.

japetos commented 8 years ago

I have PHP 5.5 and higher and it does not work with these versions.

oroalej commented 8 years ago

Use MySQl, Php 5 and lower.

martinambrus commented 6 years ago

This is a now-outdated original project repo. A more up-to-date repo can be found at https://github.com/yi12345/TravianZ - try that and see if it works for you, if you're still interested. It now works with PHP 7 even.

japetos commented 6 years ago

sure, thats why mysql_connect() is still implemented in the include files under install folder. IT DOES NOT WORK WITH PHP7!!!

japetos commented 6 years ago

closed by misstake

martinambrus commented 6 years ago

crap, sorry, that was an asshole mistake :-D but totally incidental... what I meant was this fork: https://github.com/Shadowss/TravianZ