Ad Widget

Collapse

Upgrade from PHP5.6 to PHP7.4 in order to upgrade to Zabbix 5.0.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BSDUKJ
    Member
    • Aug 2017
    • 38

    #1

    Upgrade from PHP5.6 to PHP7.4 in order to upgrade to Zabbix 5.0.0

    I am on Zabbix 3.4 but looking to make sure I have the requirements in place before I make the jump when 5.0.0 gets out of alpha/beta release.

    Zabbix 5.0.0 has a minimum requirement of PHP 7.2 and I am on PHP 5.6.

    The question I have are there any gotcha's in zabbix that need to be taking into consideration before I upgrade?

    Has anyone done this upgrade?

    I currently have the zabbix server, web-front end and mysql database on the same box.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Hi!

    I haven't done the 5.0 upgrade yet and honestly won't jump to that version until a 5.0.2 or 5.0.3 is released, as I expect the first couple versions to have some "gotchas".

    If you're on 3.4 you've probably already verified that your mysql database has both the correct character set and collation, but if not, be sure you check that and fix things up now, before upgrading any further. I don't know what version you originally started with, but when we started with Zabbix we did use 'utf8' as the charset (which for MySQL isn't try utf8, it's the 3 byte subset) but our collation was I think 'utf8_general_ci'. When I upgraded our site from 3.2.x to 4.2.x, I had to go through a process of fixing the collation on every text-type field, to get it to 'utf8_bin'.

    My site's Zabbix install is on RHEL 7, which also means that converting from PHP 5.4 to PHP 7.2 or later is going to require a switch from the base OS packages to packages from Software Collections. That won't be too bad, but switching from MariaDB 5.5 to MariaDB 10.x also requires that the MariaDB packages switch to software collections, and that's a lot more involved. I expect that will be the biggest gotcha I'll run into in prepping for 5.x. If you're not using RHEL 7.x or a derivative (like CentOS 7.x) you won't have that problem, though.

    I think the fact that you're thinking about these things now and looking at the intersection of versions for PHP and other components means that you'll likelyhave no problem with the upgrade.

    Comment

    • BSDUKJ
      Member
      • Aug 2017
      • 38

      #3
      Thanks Tim,

      Very good advice I appreciate it.

      We also started on 3.2 and upgraded to 3.4 but using CentOS 7.

      I'm not a DBA which doesn't help so I decided to Snapshot the Server and tried it out.

      Pleased to say it worked and I'm now on 4.4.

      Now to try the php upgrade!

      Cheers

      Jay


      Originally posted by tim.mooney
      Hi!

      I haven't done the 5.0 upgrade yet and honestly won't jump to that version until a 5.0.2 or 5.0.3 is released, as I expect the first couple versions to have some "gotchas".

      If you're on 3.4 you've probably already verified that your mysql database has both the correct character set and collation, but if not, be sure you check that and fix things up now, before upgrading any further. I don't know what version you originally started with, but when we started with Zabbix we did use 'utf8' as the charset (which for MySQL isn't try utf8, it's the 3 byte subset) but our collation was I think 'utf8_general_ci'. When I upgraded our site from 3.2.x to 4.2.x, I had to go through a process of fixing the collation on every text-type field, to get it to 'utf8_bin'.

      My site's Zabbix install is on RHEL 7, which also means that converting from PHP 5.4 to PHP 7.2 or later is going to require a switch from the base OS packages to packages from Software Collections. That won't be too bad, but switching from MariaDB 5.5 to MariaDB 10.x also requires that the MariaDB packages switch to software collections, and that's a lot more involved. I expect that will be the biggest gotcha I'll run into in prepping for 5.x. If you're not using RHEL 7.x or a derivative (like CentOS 7.x) you won't have that problem, though.

      I think the fact that you're thinking about these things now and looking at the intersection of versions for PHP and other components means that you'll likelyhave no problem with the upgrade.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I'm glad to hear that the upgrade to 4.4.x went well, and I think that was a good move. You're well positioned to swap out PHP now.

        Since you're on CentOS 7, you do have much the same issue with PHP that I have on RHEL 7. Are you planning on using PHP from Software Collections, which is probably the more "supported" set of packages, or PHP from Remi? Or I guess maybe build your own, but with 2 good choices already, that's probably not needed?

        My plan is to swap our install from (base OS) php 5.4 to the SCL packages for rh-php72 and make sure that's stable. I'll tackle the MariaDB parts only after PHP is prepped for 5.x.

        Comment

        • BSDUKJ
          Member
          • Aug 2017
          • 38

          #5
          We initially did this using this guide: https://www.server-world.info/en/not..._7&p=httpd&f=3

          I did the upgrade using Remi to v7.4 and it worked well. (It's not RHEL 7 but is Centos 7 so may be of some help: https://www.server-world.info/en/not...ntOS_7&p=php72 )

          The good news is the quickness of pages loading has much improved after the upgrade.

          I now have the time to look into making sure zabbix is http and not https, so need to do a bit of googling to figure that bit out!

          Cheers

          Jay


          Originally posted by tim.mooney
          I'm glad to hear that the upgrade to 4.4.x went well, and I think that was a good move. You're well positioned to swap out PHP now.

          Since you're on CentOS 7, you do have much the same issue with PHP that I have on RHEL 7. Are you planning on using PHP from Software Collections, which is probably the more "supported" set of packages, or PHP from Remi? Or I guess maybe build your own, but with 2 good choices already, that's probably not needed?

          My plan is to swap our install from (base OS) php 5.4 to the SCL packages for rh-php72 and make sure that's stable. I'll tackle the MariaDB parts only after PHP is prepped for 5.x.

          Comment

          Working...