TravianZ icon indicating copy to clipboard operation
TravianZ copied to clipboard

Deprecated: mysql_connect()

Open japetos opened this issue 9 years ago • 14 comments

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()

japetos avatar Feb 01 '16 12:02 japetos

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);

oroalej avatar Mar 02 '16 04:03 oroalej

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

https://github.com/Shadowss/TravianZ

Shadowss avatar Mar 02 '16 05:03 Shadowss

as ists the same issue

japetos avatar Mar 09 '16 12:03 japetos

USE MYSQL !!!

Shadowss avatar Mar 09 '16 12:03 Shadowss

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

japetos avatar Mar 10 '16 10:03 japetos

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..

oroalej avatar Mar 10 '16 13:03 oroalej

don't want to ;)

japetos avatar Mar 10 '16 14:03 japetos

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

oroalej avatar Mar 11 '16 07:03 oroalej

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

japetos avatar Mar 11 '16 09:03 japetos

Use MySQl, Php 5 and lower.

oroalej avatar Mar 27 '16 12:03 oroalej

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.

martinambrus avatar Oct 31 '17 20:10 martinambrus

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

japetos avatar Nov 01 '17 15:11 japetos

closed by misstake

japetos avatar Nov 01 '17 15:11 japetos

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

martinambrus avatar Nov 01 '17 16:11 martinambrus