opennetadmin/ona

upgrade issue

Closed this issue · 15 comments

Hello
I tried following https://github.com/opennetadmin/ona/wiki/Upgrades to upgrade from v18.1.1 to the latest version.
I used the tar file method .

after the upgrade i ended up with the same v18.1.1 .
here is the output of the upgrade attempt:

CHECKING PREREQUISITES...

PHP version greater than 5.0: PASS
PHP GMP module: PASS
PHP XML module: PASS
PHP mysqli function: PASS
PHP mbstring function: PASS
/opt/ona/www/local/config dir writable: PASS
/var/log/ona.log writable: PASS

It looks as though you already have a version of OpenNetAdmin installed.
You should make a backup of the data for each context listed below before proceeding with this upgrade.

We will be upgrading to version 'v18.1.1'.

We have found 1 context(s) in your current db configuration file.

Context DB type Server DB name Version Upgrade Index
DEFAULT mysqli localhost ona_default v18.1.1 11

Perform the upgrade? [y/N] : y
PHP Deprecated: Function get_magic_quotes_runtime() is deprecated in /opt/ona/www/include/adodb5/adodb-xmlschema03.inc.php on line 1411
[DEFAULT/localhost] Keeping your original data.
[DEFAULT/localhost] Upgrading tables within database 'ona_default'.
[DEFAULT/localhost] Updated DB version variable to 'v18.1.1'.
Upgrade complete, you may start using OpenNetAdmin! Enjoy!

Rob,

From what I can tell here it looks like you are already on v18.1.1. When running the install script directly, it will indicate it is upgrading the version even if you are already on that version. Probably something that could be made better.

What I'm seeing though is a PHP deprecation message that may be interfering with a few other things.

If you are trying to set this up on a more recent Linux distro, I would actually recommend using the develop branch as it has some fixes for this kind of stuff. Really I need to get to the point of actually merging develop into master and releasing a proper new version of things.

I'd be glad to help you get through that. Last I left it , things were in a state of flux with me trying to make updates to the install process to deal with some new PHP changes. This requires you to use the installcli.php installer and not the web based one for certain situations.

To help out with that, I'd need a bit more context on what OS version and PHP version you are on.

Hi Matt, I have been slammed this month with other work, I'll get back to this in May.

Hello Matt
re: ' To help out with that, I'd need a bit more context on what OS version and PHP version you are on. '

the operating system is Debian bullseye

php:

php -v

PHP 7.4.33 (cli) (built: Feb 22 2023 20:07:47) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

also
you are correct we are using: © 2023 OpenNetAdmin - v18.1.1
just saw that at the ona > about .

Hey Rob,
Yep it looks like you are on the latest official release of 18.1.1. I would however recommend you actually install from the development branch as it has a few changes that work better on newer distros and PHP versions.

Since I have not been able to fully test a dataset upgrade recently, I would very much advise you take a full database backup before performing the upgrade.

I would be happy to help you out on a conversion. In fact, based on your experience of upgrading I will likely merge the develop branch in and release an updated version of ONA. It would be great to confirm the update does as it should. I'm reasonably confident it will but just want to see that it does with real live data other than my own.

Thanks!

Here goes of the top of my head:

  • https://github.com/opennetadmin/ona/wiki/Backups for info on backups
  • make sure you have git installed.. apt-get install git for debian should do it
  • I'm going to assume you have installed into /opt/ona for the remaining examples.
  • cp -r /opt/ona /opt/ona.backup #extra safety to keep an un-touced backup
  • mv /opt/ona /opt/ona.original #moves it out of the way so we can clone into this dir
  • cd /opt
  • git clone https://github.com/opennetadmin/ona.git
  • cd ona
  • git checkout develop
  • cp -r /opt/ona.original/www/local .
  • cd /opt/ona/install
  • php installcli.php # follow the prompts to perform upgrades. your version will still say 18.1.1

Now, again this is very top of the head. My goal is to get you switched over to just running your install direct from a git clone of the develop branch. I would venture to guess that I have forgotten something or may not know something about your environment here. This may require you to do some ownership updates on the new directory depending on your setup. I'm hoping you are at least somewhat familiar with git commands as it can help as well, but its not required.

You should be able to revert by just putting the /opt/ona.original back. If you run into issues hit me up in the other communication method I emailed you directly.

yes it should be in /opt/ona.original/www/local/config/database_settings.inc.php

Now, the fact that it is asking you for this information again leads me to believe something was not copied over properly from your original copy. One of my steps above was to copy the www/local directory from your original install to the new one. So when you run the installer, it should have just said it did an "upgrade".

If the database_settings file was already in place and readable, then it should not have asked these questions. You might check on that first.

Ahh I see my syntax issue. Run this:

cp -r /opt/ona.original/www/local /opt/ona/www/local

Rob and I worked to get this resolved. We also confirmed much of the new development work is functional.