Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-1223

Database: Change from mysql to mysqli functions

Details

    Description

      Hello
      I have had this patch laying around for some time.
      Where to start.. For the most part this only changes mysql to mysqli function, but also adds a function for db connect and it removes the mres function (now replaced by dbEscape function in dbFacile.php)

      This removes support for PHP < 5 and MySQL < 4.1. Hopefully no one is using that in 2015
      I was thinking of doing something in OOP, but I have understood that is a bit of no-no in this project, besides that would also change a lot more code.

      Have been running this in my test environment for 6+ months (PHP 5.3, MySQL 5.1)) and in my production environment for 2-3 months (PHP 5.4, MySQL 5.1) I feel confident in it's usage. However I do not use every function in Observium, so it would be cool if others could try this out.

      Another reason for this is also that mysql* functions has not been recommended for years, and as of PHP 5.5 the functions has been deprecated.

      As already said, hope someone can test. I also welcome suggestions

      Attachments

        Activity

          [OBS-1223] Database: Change from mysql to mysqli functions

          Niice.

          kentbjoh Kent Johannessen added a comment - Niice.

          MySQLi added in r6455.

          landy Mike Stupalov added a comment - MySQLi added in r6455.
          kentbjoh Kent Johannessen added a comment - - edited

          I agree on refactor part, but as I said this is just a function change and is compatible with old config.
          Looking forward to see updates on this

          kentbjoh Kent Johannessen added a comment - - edited I agree on refactor part, but as I said this is just a function change and is compatible with old config. Looking forward to see updates on this

          Also, do not make any OOP code for observium - this code will blocked by Adam.

          landy Mike Stupalov added a comment - Also, do not make any OOP code for observium - this code will blocked by Adam.

          Work already in progress, but this is not just "replace mysql to mysqli". Some functions should refactored and should remain compatible with old config and mysql extension.

          landy Mike Stupalov added a comment - Work already in progress, but this is not just "replace mysql to mysqli". Some functions should refactored and should remain compatible with old config and mysql extension.

          People

            landy Mike Stupalov
            kentbjoh Kent Johannessen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: