EvoEsports / EvoSC

EvoSC is a modern server-controller for TM²/TM2020 running on PHP7.4
https://evoesports.gg
Other
64 stars 20 forks source link

Usage of a deprecated MySQL PHP extension (ext/mysql) #111

Open Harha opened 3 years ago

Harha commented 3 years ago

I'm setting up a Docker image for running EvoSC and during the process I noticed that your code is apparently using the "old" mysql extension which, to my understanding, has been deprecated years ago?

The code refers to "mysql" driver for example on this line: https://github.com/EvoTM/EvoSC/blob/master/core/Commands/Migrate.php#L39

You can read about the "ext/mysql" being deprecated a long time ago here: https://wiki.php.net/rfc/mysql_deprecation

Instead I think the driver "mysqli" should be used. I don't have much experience with PHP, but to me this seems like an issue that should be fixed.

I have the extensions "mysqli" and "mysqlnd" installed with PHP 7.3 and the code does not work the code just throws an exception "could not find driver (SQL: select * from information_schema.tables where table_schema = evosc and table_name = migrations and table_type = 'BASE TABLE')".

ItsPhenom commented 3 years ago

Fyi, there will be official docker images soon. Doesn't solve your issue, but i thought i could let you know. But this will probably not happen until 1.0.0. There are already some but those are ones more tailored to our needs. The public ones will be slightly different.

Harha commented 3 years ago

@ItsPhenom Okhay, well I won't waste my time on creating my own image then, good to know, thanks.