← Back to team overview

mahara-contributors team mailing list archive

[Bug 1187964] [NEW] Use adodb "mysqli" instead of "mysql"

 

Public bug reported:

Mahara is currently using the adodb "mysql" driver for MySQL
connections. This is based on an older PHP library which is no longer in
active development and lacks certain features, most notably transactions
(see for instance https://mahara.org/interaction/forum/topic.php?id=5434
).

We should probably switch to the adodb "mysqli" driver, which is built
on the newer mysqli PHP library and *does* support transactions.

There are two ways we could go about this gracefully:

1. When a user supplies the string "mysql5" in their config.php file, we
could silently interpret this to mean that they want to use the "mysqli"
driver. (We could alternately provide some other way to indicate they
want to use the older "mysql" library if we really want to support it.)

2. OR, we could show the admin a warning message after they
upgrade/install, which tells them they should really change the "mysql5"
in their config.php to "mysqli".

I support option #1. Given that we only support mysql and postgres,
there's no reason we shouldn't abstract away the connection between
config.php and the name of the underlying adodb driver. (For that
matter, we should probably change the recommended dbtypes from "mysql5"
and "postgres8" to just "mysql" and "postgres").

** Affects: mahara
     Importance: Medium
         Status: Triaged

** Changed in: mahara
    Milestone: None => 1.8.0rc1

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
       Status: New => Triaged

** Description changed:

  Mahara is currently using the adodb "mysql" driver for MySQL
  connections. This is based on an older PHP library which is no longer in
  active development and lacks certain features, most notably transactions
  (see for instance https://mahara.org/interaction/forum/topic.php?id=5434
  ).
  
  We should probably switch to the adodb "mysqli" driver, which is built
  on the newer mysqli PHP library and *does* support transactions.
  
  There are two ways we could go about this gracefully:
  
- 1. When a user supplies the string "mysql" in their config.php file, we
+ 1. When a user supplies the string "mysql5" in their config.php file, we
  could silently interpret this to mean that they want to use the "mysqli"
  driver. (We could alternately provide some other way to indicate they
  want to use the older "mysql" library if we really want to support it.)
  
  2. OR, we could show the admin a warning message after they
- upgrade/install, which tells them they should really change the "mysql"
+ upgrade/install, which tells them they should really change the "mysql5"
  in their config.php to "mysqli".
  
  I support option #1. Given that we only support mysql and postgres,
  there's no reason we shouldn't abstract away the connection between
  config.php and the name of the underlying adodb driver. (For that
  matter, we should probably change the recommended dbtypes from "mysql5"
  and "postgres8" to just "mysql" and "postgres").

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1187964

Title:
  Use adodb "mysqli" instead of "mysql"

Status in Mahara ePortfolio:
  Triaged

Bug description:
  Mahara is currently using the adodb "mysql" driver for MySQL
  connections. This is based on an older PHP library which is no longer
  in active development and lacks certain features, most notably
  transactions (see for instance
  https://mahara.org/interaction/forum/topic.php?id=5434 ).

  We should probably switch to the adodb "mysqli" driver, which is built
  on the newer mysqli PHP library and *does* support transactions.

  There are two ways we could go about this gracefully:

  1. When a user supplies the string "mysql5" in their config.php file,
  we could silently interpret this to mean that they want to use the
  "mysqli" driver. (We could alternately provide some other way to
  indicate they want to use the older "mysql" library if we really want
  to support it.)

  2. OR, we could show the admin a warning message after they
  upgrade/install, which tells them they should really change the
  "mysql5" in their config.php to "mysqli".

  I support option #1. Given that we only support mysql and postgres,
  there's no reason we shouldn't abstract away the connection between
  config.php and the name of the underlying adodb driver. (For that
  matter, we should probably change the recommended dbtypes from
  "mysql5" and "postgres8" to just "mysql" and "postgres").

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1187964/+subscriptions


Follow ups

References