Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPSK-Manager Fails to create DB #24

Closed
sharker-RNIB opened this issue Nov 17, 2022 · 4 comments
Closed

iPSK-Manager Fails to create DB #24

sharker-RNIB opened this issue Nov 17, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sharker-RNIB
Copy link

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):

  • OS:
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

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

@sharker-RNIB
Copy link
Author

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
Copy link

htlgit00 commented Jul 6, 2023

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
Copy link
Collaborator

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 ciesinsn self-assigned this Sep 29, 2023
@ciesinsn ciesinsn added the bug Something isn't working label Sep 29, 2023
@ciesinsn
Copy link
Collaborator

changes have been merged into master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants