EvoSC icon indicating copy to clipboard operation
EvoSC copied to clipboard

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

Open Harha opened this issue 3 years ago • 2 comments

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')".

Harha avatar Feb 25 '21 00:02 Harha

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.

ItsPhenom avatar Feb 25 '21 01:02 ItsPhenom

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

Harha avatar Feb 25 '21 12:02 Harha