Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Upgrade from OCS-2.0.5 to OCS-2.4 - Cannot Login

Hello Everyone.

I performed an upgrade of our OCS today.
Migration from:
Ubuntu-10.04 MySQL-5.1.73 PHP5 OCSNG_UNIX_SERVER-2.0.5
to
Ubuntu-16.04 MySQL-5.7.21 PHP7 OCSNG_UNIX_SERVER_2.4
I copied the entire "ocsweb" DB from the old server to the new server.
Ran mysql_upgrade - All Tables updated successfully.

I was able to access the "install.php" page via the browser with no issue and update the MySQL access information successfully.
Once that completed, I clicked on the link to take me to the Login Page.

I could not login with the default "admin" + "admin" ID & Pass in OCS at that point.
The only information it gives in the browser is an Error on the Screen "User Not Registered".

So I thought that this was related to the issue with the way that MySQL handles password hashes in the old version versus the new one.
So I Logged in to MySQL from the CLI and added another "Admin User" and set the password with the new MySQL Password Hash format.
########
INSERT INTO `operators` VALUES ("aduser", "Admin", "User", "", 1, "Default Administrator Account", "sadmin", "email@email.com", "");
UPDATE operators SET PASSWD=password('admin') WHERE id='aduser';
#######

Then verified that it was there and could be seen.
mysql> select * from operators;
+-------+-----------+----------+-------------------------------------------+-----------+-------------------------------+---------------+------------------+------------+
| ID    | FIRSTNAME | LASTNAME | PASSWD                                    | ACCESSLVL | COMMENTS                      | NEW_ACCESSLVL | EMAIL            | USER_GROUP |
+-------+-----------+----------+-------------------------------------------+-----------+-------------------------------+---------------+------------------+------------+
| admin | admin     | admin    | 3c086f596b4aee58e1d71b3626fefc87          |         1 | Default administrator account | sadmin        |                  |            |
| aduser| Admin     | User     | *78C7FC2469E35F69BA86D1D4C8C3841B422191E4 |         1 | Default Administrator Account | sadmin        | email@email.com |            |
+-------+-----------+----------+-------------------------------------------+-----------+-------------------------------+---------------+------------------+------------+

Then flushed privileges and tables and even restarted MySQL to be sure.
Went back to the Login page and still no dice with EITHER user. (Old and new Password formats.)

The only information I can get is from the Apache Error Log:
#############
[Wed Mar 07 19:26:47.620276 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.620656 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.622008 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.623931 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.625145 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.626547 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.626777 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.626998 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.629491 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.631349 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.631913 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.632394 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.632637 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.633580 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.633833 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.634065 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.634289 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.634838 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.635706 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.635938 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.636748 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.637893 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.638481 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.639648 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.647387 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.647898 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.648430 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.649942 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.650176 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 201, referer: http://ocsinventory-ng/ocsreports/index.php
[Wed Mar 07 19:26:47.653061 2018] [:error] [pid 30025] [client 192.168.0.10:54924] PHP Warning:  mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /usr/share/ocsinventory-reports/ocsreports/backend/AUTH/methode/local.php on line 27, referer: http://ocsinventory-ng/ocsreports/index.php
#############

Has anyone else ran into this issue wherein you cannot login after upgrading?
Any Thoughts or Suggestions would be appreciated!

I look forward to any responses.
-Tim
in OCS Inventory NG server for Unix by (170 points)

3 Answers

+1 vote
Hi,

to upgrade from 2.0.5 to 2.4 you have to upgrade from 2.0.5 to 2.1.x then to 2.2.x then 2.3.x and finally to 2.4.

Regards

Frank
by (90.4k points)
0 votes
Hello Frank, and thank you for your response.

However, that is not making sense.
When you perform the Install of 2.4 it does a DB Schema update from the install.php on initial access.
As I stated in my question, that stated that it was successful, so why would I have to do a "stepped upgrade" if the DB Schema was updated to 2.4 from the 2.05 DB that it connected to?

Can you clarify why it has to be a "stepped upgrade" as I think that I am missing something here.

Thanks!
-Tim
by (170 points)
0 votes
Je suis egalement surpris de cette migration progressive. Quelqu'un aurait-il des infos ou des certitudes?
by (140 points)
 
Powered by Question2Answer
...