CiscoDevNet / iPSK-Manager

Identity PSK (IPSK) Manager for Cisco ISE provides an example of how to manage the full Life Cycle of Wi-Fi Pre Shared Keys for supported Hardware/Software through Cisco ISE.
Apache License 2.0
30 stars 16 forks source link

iPSK-Manager Fails to create DB #24

Closed sharker-RNIB closed 11 months ago

sharker-RNIB commented 1 year ago

Describe the bug I am installing iPSK-Manager on ubuntu 22.04-LTS Server and cannot create the iPSK Database.

To Reproduce Steps to reproduce the behavior:

  1. Following the Install readme on Github. I got to the install.php
  2. Filled in all details as per suggestions
  3. Create Admin Password Click Next
  4. Click Install
  5. Get 500 Error Expected behavior should create a DB and continue to install iPSK-Manager Screenshots image image image image image image image image

Server (please complete the following information):

Desktop OS: Windows 10 22H2 Browser: Edge Additional context Add any other context about the problem here.

sharker-RNIB commented 1 year ago

I've managed to get iPSK-Manager installed. Ubuntu 22.04 comes with PHP 8.1.x the php code in the installer.php file doesn't work very well with php 8.1 I had to "downgrade" the php version back to 7.4.x and install all the 7.4 exentions:

Downgrade: sudo apt install software-properties-common apt-transport-https -y

install the php 7 repo

sudo add-apt-repository ppa:ondrej/php -y sudo apt update sudo apt upgrade

install php7

sudo apt install php7.4 php7.4-common libapache2-mod-php7.4 php7.4-cli

Disable php 8

sudo a2dismod php8.1

Enable php 7

sudo a2enmod php7.4

restart Apache2

sudo systemctl restart apache2

Install php extentions needed for iPSK-Manager

sudo apt install php7.4-mbstring sudo apt install php7.4-xml sudo apt install php7.4-ldap sudo apt install php7.4-mysqli sudo apt install php7.4-mysqlng sudo apt install php7.4-curl

I do not know if all those are needed I am using my command history for this

Then restart apache2 again: sudo systemctl restart apache2

After doing this I could then get through the full installer.

This is not ideal as php7.4 could have issues in it. Ideally iPSK-Manager needs to be updated to php 8

htlgit00 commented 1 year ago

The exception appears from lines 358 ~ 363 of installer.php

            if($dbConnection->select_db($_SESSION['databasename'])){
                $installProgress .= "<div><span style=\"color: #ff0000\" data-feather=\"x-circle\"></span>Database Already Exists</div>";
                goto Bail;
            }else{
                $installProgress .= "<div><span style=\"color: #2d8c32\" data-feather=\"check-circle\"></span>Database is not in use</div>";
            }

Likely, this is due to this change PHP RFC: Change Default mysqli Error Mode, which reported in PHP 8.1 @ https://www.php.net/manual/en/mysqli-driver.report-mode.php

As of PHP 8.1.0, the default setting is MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT. Previously, it was MYSQLI_REPORT_OFF.

ciesinsn commented 12 months ago

This specific issue (lines 358-363 above) has been fixed and working on another fix or two before pushing it up to the branch.

ciesinsn commented 11 months ago

changes have been merged into master branch