Page MenuHomePhabricator

Need to replace mysql_*() functions for in favor of mysqli or pdo
Closed, ResolvedPublic

Description

PHP 5.5 (using current master) has dropped support for the original mysql plugin. We'll have to use mysqli or pdo.


Version: 1.21.x
Severity: critical

Details

Reference
bz45288

Event Timeline

bzimport raised the priority of this task from to High.
bzimport set Reference to bz45288.
bzimport added a subscriber: Unknown Object (MLST).
demon created this task.Feb 22 2013, 6:54 PM

PHP 5.5 release plans:
http://marc.info/?l=php-internals&m=134710500026355&w=2

Looks like it is coming soon (Feb/March 2013). Lets try to get this for 1.21 so that we don't have to start including a maximum version in our PHP support ("5.3.2 or higher") for our release.

Indeed. I'm curious if we should go the mysqli or pdo route.

Has anyone got any preferences? I think I have a working patch for MySQLi but I'd like to see a decision made before I upload it.

hoo added a comment.Mar 3 2013, 3:28 PM

I personally prefer PDO though I haven't yet used it with a project even near this size.

Using PDO could kick in handy especially in case more than one DB class starts to use it...

MaxSem added a comment.Mar 3 2013, 9:28 PM

(In reply to comment #4)

Using PDO could kick in handy especially in case more than one DB class
starts
to use it...

SQLite uses PDO already.

This has the 1.21.0 target milestone set by Krinkle, so there are roughly two months left.

The first step here is probably to decide whether to go for PDO or for MySQLi. CC'ing Greg, plus wondering if I should add the "platformeng" keyword.

(In reply to comment #3 by Krenair)

I think I have a working patch for MySQLi

Krenair: Could you share that patch, maybe?
Asking as it's one potential way to get some progress here...

(In reply to comment #6)

Krenair: Could you share that patch, maybe?

Gerrit change 55106

greg added a comment.Mar 21 2013, 8:55 PM

This probably needs a bigger discussion than the 6 people on the CC list; should've probably been brought up during our quarterly review mid-February.

greg added a comment.Mar 21 2013, 10:56 PM

Alright, officially bumped to 1.22. We won't be updating to 5.5 at WMF during our use of 1.21 and the time needed to do this is too much right now.

We should use a DatabaseMysqli file.

Should the MediaWiki 1.21 release notes then mention that there could be problems using it with PHP 5.5?

greg added a comment.Mar 22 2013, 3:20 PM

(In reply to comment #11)

Should the MediaWiki 1.21 release notes then mention that there could be
problems using it with PHP 5.5?

PHP 5.5 isn't out yet (it is still in Beta) so I'd say not.

Also changed topic, since the mysql extension has long been on its way out, even without PHP 5.5.

Related URL: https://gerrit.wikimedia.org/r/62130 (Gerrit Change I905d4a4550377bc849a860f0962dad710d9dc71f)

Related URL: https://gerrit.wikimedia.org/r/62173 (Gerrit Change I6733fe21c4aa7443e409c5dfa7c789552b2b62b7)

Related URL: https://gerrit.wikimedia.org/r/62174 (Gerrit Change I7334c4872f51ef38ac17c747e2ef4a8a0236623a)

Re-assigned to Jakub since he's the owner of the new patches. Looks like we may be able to close this soon.

Change 62174 abandoned by Chad:
Allow selection of MySQLi database type during installation

Reason:
Per Tim's comment, this absolutely should not be done like this.

https://gerrit.wikimedia.org/r/62174

Change 62173 merged by jenkins-bot:
Add support for mysqli extension

https://gerrit.wikimedia.org/r/62173

Danny_B moved this task from Unsorted to PHP 5.5 on the [DO NOT USE] NewPHP board.Jul 11 2016, 1:55 AM