phpsaml icon indicating copy to clipboard operation
phpsaml copied to clipboard

Not able to install the plugin on the GLPI 10.0.1

Open rajesh-rengaraj opened this issue 3 years ago • 17 comments

Hi, derrick smith phpsaml plugin cannot install in GLPI 10.0.1. Please help me with this issue.

rajesh-rengaraj avatar Jun 27 '22 10:06 rajesh-rengaraj

Hello, I also have the same issue.

oswalvas avatar Jun 28 '22 09:06 oswalvas

Download the branch 1.2.0 and change the function plugin_phpsaml_check_prerequisites on setup.php line 68 from:

function plugin_phpsaml_check_prerequisites()
{

    if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.0', 'gt')) {
        echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
        return false;
    }

    return true;
}

To

function plugin_phpsaml_check_prerequisites()
{

    if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.2', 'gt')) {
        echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
        return false;
    }

    return true;
}

This will allow it to be installed on GLPI versions 9.4 to 10.0.2 with no problems.

alessandrocaetanob avatar Jun 28 '22 15:06 alessandrocaetanob

Version 1.3 works with GLPI v10. I haven't created a release yet but you can download the branch.

derricksmith avatar Jun 28 '22 16:06 derricksmith

Hi Derrick,

I only see branch 1.2 listed (https://github.com/derricksmith/phpsaml/branches), but you've mentioned branch 1.3. Am I missing something?

Thanks for all the work you do on this project!

swalker-aup avatar Jun 29 '22 12:06 swalker-aup

Hi Derricksmith,

First of all thanks for the reply. I really appreciate your help As per your suggestions I have made the changes in the plugin. But during the installation am receiving the below error. Please help me with this issue.

error populate glpi_plugin_phpsaml_configs Incorrect integer value: '' for column glpi.glpi_plugin_phpsaml_configs.jit at row 1

Regards,

Rajesh R Network Team Mallow Technologies Private Limited

On 28-Jun-2022, at 9:28 PM, Alessandro Caetano Beltrão @.***> wrote:

Download the branch 1.2.0 https://github.com/derricksmith/phpsaml/tree/Version-1.2.0 and change the function plugin_phpsaml_check_prerequisites on setup.php line 68 from:

function plugin_phpsaml_check_prerequisites() {

if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.0', 'gt')) {
    echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
    return false;
}

return true;

} To

function plugin_phpsaml_check_prerequisites() {

if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.2', 'gt')) {
    echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
    return false;
}

return true;

} This will allow it to be installed on GLPI versions 9.4 to 10.0.2 with no problems.

— Reply to this email directly, view it on GitHub https://github.com/derricksmith/phpsaml/issues/86#issuecomment-1168897078, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFM2UBEUBKOIZLR4J76ST6DVRMOLXANCNFSM5Z6BWQSA. You are receiving this because you authored the thread.

rajesh-rengaraj avatar Jul 05 '22 05:07 rajesh-rengaraj

Download the branch 1.2.0 and change the function plugin_phpsaml_check_prerequisites on setup.php line 68 from:

function plugin_phpsaml_check_prerequisites()
{

    if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.0', 'gt')) {
        echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
        return false;
    }

    return true;
}

To

function plugin_phpsaml_check_prerequisites()
{

    if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '10.0.2', 'gt')) {
        echo "This plugin requires GLPI >= 9.4 and GLPI <= 10.0.2";
        return false;
    }

    return true;
}

This will allow it to be installed on GLPI versions 9.4 to 10.0.2 with no problems.

Hi Alessandro, I did that some days ago, and it doesn't work for me, GLIP stop working can't reach the web application I had to disable the plugin by the CLI and when I check the status I have this error: 2022-07-05 15_13_34-Remote Desktop Manager Free  PPSUPPORT

thanks

b0n0is avatar Jul 05 '22 13:07 b0n0is

Hi guys, I changed the code locally

Summary: In ./front/config.php Search for "$phpSamlConfig->showForm()" and replace for "$phpSamlConfig->showForm($_POST["id"])"

In ./front/config.form.php Search for "$phpsamlconf->showForm()" and replace for "$phpsamlconf->showForm($_POST["id"])"

In ./inc/config.class.php Search for "function showForm()" and replace for "function showForm($ID, array $options = [])"

This worked for me.

breno404 avatar Jul 14 '22 13:07 breno404

Fixed in Version 1.2.1. Take a look and let me know if there are any issues.

derricksmith avatar Jul 14 '22 19:07 derricksmith

Hi Derricksmith,

I have tried your updated plugin Phpsaml 1.2.1 with glpi version 10. But am I not able to save the settings. Please help me on this issue.

Regards,

Rajesh R Network Team Mallow Technologies Private Limited

On 15-Jul-2022, at 1:05 AM, Derrick Smith @.***> wrote:

Fixed in Version 1.2.1. Take a look and let me know if there are any issues.

— Reply to this email directly, view it on GitHub https://github.com/derricksmith/phpsaml/issues/86#issuecomment-1184824310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFM2UBFYE3OLRZXV7HJDQSDVUBTZ3ANCNFSM5Z6BWQSA. You are receiving this because you authored the thread.

rajesh-rengaraj avatar Jul 15 '22 05:07 rajesh-rengaraj

Sorry @b0n0is, I forgot to include something @derricksmith commented on issue #75. For the plugin to work, you have the change line 53 on the file inc/config.class.php from:

function showForm(){

to:

function showForm($ID, array $options = []) {

alessandrocaetanob avatar Jul 19 '22 20:07 alessandrocaetanob

Sorry @b0n0is, I forgot to include something @derricksmith commented on issue #75. For the plugin to work, you have the change line 53 on the file inc/config.class.php from:

function showForm(){

to:

function showForm($ID, array $options = []) {

This is included in Version 1.2.1

derricksmith avatar Jul 19 '22 20:07 derricksmith

Nice! That's even better, so people just need to download the version from the new branch :)

alessandrocaetanob avatar Jul 19 '22 20:07 alessandrocaetanob

Hello @alessandrocaetanob @derricksmith thanks you both of you for the update I tired the version 1.2.1 and 1.2.0 with changing the code of the files: install.php and inc/config.class.php I have same error when I tried to install the plugin image

for information I updated my production GLPI 9.5.3 with plugin 1.1.1 to GLPI 10.0.1 also had to update my php from 7.3 to 8.1 (maybe php version issue)

kind regards ;)

EDIT: 22/07

i just updated a new glpi 10.0.2 test from my production, PHP 7.4 is the minimum require fir the 10th version. so the plugin 1.2.1 works good with GLPI 10.0.2 and PHP 7.4 but not work with PHP 8.0

b0n0is avatar Jul 20 '22 09:07 b0n0is

Fixed on line 22 of update.class.php in Version 1.2.1. Added is_array($array) to conditional.

Test and let me know if you still receive an error.

derricksmith avatar Jul 22 '22 17:07 derricksmith

installation done without problem on php 8.1 got an error with php7.4 but plugin installed and activated image

I have another issue, I can't update the configuration

b0n0is avatar Jul 25 '22 09:07 b0n0is

Same for me than @b0n0is. I cannot save the configuration. PHP 7.4.20 GLPI 10.0.0.2 phpsaml: 1.2.1

Ketchup31 avatar Aug 09 '22 19:08 Ketchup31

What columns are in the phpsaml plugin table?

derricksmith avatar Aug 09 '22 19:08 derricksmith

Issue is resolved in https://github.com/derricksmith/phpsaml/pull/106

Can you confirm?

derricksmith avatar Nov 17 '22 02:11 derricksmith