User tests: Successful: Unsuccessful:
This updates JDatabaseDriver::getInstance()
to detect if the requested driver is mysql
which uses the removed ext/mysql
PHP extension in PHP 7 and changes the driver option to mysqli
in this environment. A message is logged to the deprecation logger so that a site admin can pick up on the error without disclosing any info to end users.
Note that this is not a guaranteed failsafe; if for whatever reason an environment doesn't have the ext/mysqli
PHP extension this will fail.
Labels |
Added:
?
|
Labels |
Added:
?
|
Category | ⇒ | Libraries |
maybe we can place now or with 3.4.2 a postinstall message that show all admins that use mysql driver that this gets unsupported with PHP7?
I wouldn't go the post-install route right now. It's still far too early (PHP 7 isn't even in alpha phase yet) and as the forums have shown with this last release, users get in a panic and don't understand what to do when we suggested they update .htaccess or robots.txt.
I've retooled it to try and check support for the other drivers and switch to them. If no other driver is supported, it will just fail; otherwise it'll prefer MySQLi over PDO MySQL.
Looks good I will try to test if i get some time.
Would it be better for long term to try and upgrade users to PDO rather than mysqli?
PDO isn't installed as commonly as the mysqli extension.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-11 00:08:58 |
Closed_By | ⇒ | wilsonge |
Milestone |
Added: |
@mbabker
Can we not check if mysqli or pdosql is supported and switch to it if it is supported?