Hello,
Question: How to upgrade from php version : 5.4.16 to 7.1.32 with server migration to cloud?
I have a virtual machine running this:
php version : 5.4.16
mysql version: mariadb-server-5.5.44-2
apache: 2.4.6
osticket v1.7.7 and 1.6 ST

and I need to migrate it to another VM (cloud) running:
php version 7.1.32
mysql version: mariadb-server-5.5.64-1

apache: 2.4.6
latest stable osticket

Can anyone tell me in what order I need to upgrade in order to accomplish these for 2 different version v1.7.7 and 1.6 ST?
The server team already moved all the code from old vm to new cloud vm but not working.
Here are some of the error I got (include/class.thread.php)
PHP Warning: Declaration of Message::create($vars, &$errors) should be compatible with ThreadEntry::create($vars)
PHP Warning: Declaration of Message::add($vars, &$errors) should be compatible with ThreadEntry::add($vars)
PHP Warning: Declaration of Response::create($vars, &$errors) should be compatible with ThreadEntry::create($vars)

Is there a documented or recommended way of doing this?

  • RBGE replied to this.

    leehlan As I understand it, the best way to do this is to set up a fresh osTicket 1.12.2 install on the new server, then copy your database from the old system across. Update include/ost-config.php to use this imported database, then log in to the admin panel of osTicket to complete the upgrade.

    In theory going from 1.6 or 1.7 to 1.12.2 should be fine, but if there are any issues you may want to try an intermediate upgrade on the old (PHP 5.4) server to a slightly later edition.

    As always, make sure to back up everything beforehand!

    Thanks RBGE ...I have the issue to log in to the admin panel as it is showing empty page when I go to the admin login page.. not sure why, any idea?

    Besides, I had some customization in current code .. so if I install a fresh osTicket 1.12.2 will it overwrite my customization code?

    • RBGE replied to this.

      leehlan Definitely the correct settings in your new ost-config.php? Does anything show up in your Apache or PHP error logs?

      EDIT: Yes, you'll need to redo your customisations.

      @leehlan

      Upgrading from 1.6 ST you'll have to upgrade to v1.9.x first then from there to the latest. There is a bug rn with v1.6 upgrades so this is the workaround until it's resolved.

      Cheers.

      Ah, apologies for the missing information then @leehlan - hopefully things go a bit better on the new server once you import the database from a 1.9.x install!

        @KevinTheJedi Hi Kevin, do you have the link to download v1.9x ? Could you share with me?
        Thanks.

        RBGE Hopefully all good, definitely will need you guys help and advise.

        one more question .. if I don't want to change to the latest osTicket but continue with v1.6 ST and v.1.7.7, could it run in php 7.1.32 ? what configuration file I need to change?

          leehlan It's not just a case of changing a config file unfortunately, the whole system would need changed. osTicket 1.6 and 1.7 were written before PHP 7.1 was available, so just aren't compatible at all. Not to mention they're both unsupported and may contain security vulnerabilities.

          I'm guessing the customisations are quite intensive and will take a lot of time to replicate? Even so, it may still be worth looking into upgrading as staying on the old servers will leave you using vulnerable versions of PHP (and possibly the server OS as well) just to keep osTicket 1.6 working. Currently 1.10.7 and 1.12.2 are the supported versions, although if you're going to put the work into upgrading and redoing the customisations, you'd be better going all the way to 1.12.2 as I believe 1.10.x will drop off the supported list once 1.14 is released.

          leehlan one more question .. if I don't want to change to the latest osTicket but continue with v1.6 ST and v.1.7.7, could it run in php 7.1.32 ?

          In a word: No.

          leehlan what configuration file I need to change?

          You would have to go through github and find all the PHP compatibility PRs (pull requests) and apply them and hope that they do not break something else (which is very likely).

          @leehlan

          Scratch what I said before. In order to upgrade from v1.6 ST to the latest version, download the latest version of v1.12.2 from our website. Make a full backup of your current site files and a full backup of your database before upgrading. Next, copy the new v1.12.2 files on top of the old files and edit the code to revert this commit. This just means reverse the changes so where there is RED add those lines and where it is GREEN remove those lines. Once you do this you can upgrade your PHP to 5.6 and upgrade osTicket. You can follow our Upgrade instructions if you don't know how. After you upgrade osTicket you can upgrade PHP to 7.3 and you'll be all the way up to date.

          one more question .. if I don't want to change to the latest osTicket but continue with v1.6 ST and v.1.7.7, could it run in php 7.1.32 ? what configuration file I need to change?

          As @RBGE said, that is totally not recommended as you will be vulnerable to all sorts of attacks including SQL injection (aka Mr. Steal Yo' Data) which is the wort of the worst. Not to mention you will not be able to take advantage of all the new features and bug fixes. Also, any version below v1.10.x does not support PHP 7.0+. Current PHP support is as follows:

          • v1.6 ST - v1.9.x -> PHP 5.3-5.6
          • v1.10.x -> PHP 5.6-7.2
          • v1.12.2 -> PHP 7.0-7.3

          Cheers.

          Write a Reply...