diff --git a/README.md b/README.md index 3bbcf4f..9ac0432 100644 --- a/README.md +++ b/README.md @@ -132,20 +132,18 @@ server { index index.php; location ~ \.php$ { include snippets/fastcgi-php.conf; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; + fastcgi_pass unix:/run/php/php8.1-fpm.sock; } } location /myservice/ { + alias /var/www/spid-cie-php/vendor/simplesamlphp/simplesamlphp/www/; index index.php; - location ~ \.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.+)$; - try_files $fastcgi_script_name =404; - set $path_info $fastcgi_path_info; - fastcgi_param PATH_INFO $path_info; - fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; - fastcgi_index index.php; - include fastcgi.conf; + location ~ ^(?/myservice)(?.+?\.php)(?/.*)?$ { + fastcgi_param SCRIPT_FILENAME $document_root$phpfile; + fastcgi_param PATH_INFO $pathinfo if_not_empty; + fastcgi_pass unix:/run/php/php8.1-fpm.sock; + include fastcgi_params; } } } diff --git a/composer.json b/composer.json index 8c2be1e..a892ba6 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "config": { - "version": "3.18.6", + "version": "3.18.7", "allow-plugins": { "simplesamlphp/composer-module-installer": true } diff --git a/setup/Setup.php b/setup/Setup.php index 021b377..c8823a5 100644 --- a/setup/Setup.php +++ b/setup/Setup.php @@ -73,8 +73,8 @@ public static function setup(Event $event) { $_fpaProvincia = ""; $_fpaNazione = "IT"; $_fpaOrganizationName = ""; - $_fpaOrganizationEmailAddress = ""; - $_fpaOrganizationTelephoneNumber = ""; + $_fpaOrganizationEmailAddress = "info@organization.org"; // must be not null otherwise an error is raised in authentication + $_fpaOrganizationTelephoneNumber = "+3912345678"; // must be not null otherwise an error is raised in authentication $config = file_exists("spid-php-setup.json") ? json_decode(file_get_contents("spid-php-setup.json"), true) : array(); @@ -1013,12 +1013,19 @@ public static function setup(Event $event) { } catch(Exception $e) { $symlink_manual_creation_command= "WARNING! At the end of the installation execute as administrator this command:\n$mklink_cmd"; } - + } else { // linux - symlink($cmd_target, $cmd_link); + if (is_link($cmd_link)) { + if (readlink($cmd_link) != $cmd_target) { + $symlink_manual_creation_command= "WARNING! At the end of the installation check the symbolic link at $cmd_link, it must link to $cmd_target"; + } + } + else { + symlink($cmd_target, $cmd_link); + } } - + if ($symlink_manual_creation_command === false) { echo $colors->getColoredString("OK", "green"); } else { diff --git a/setup/sdk/spid-php.tpl b/setup/sdk/spid-php.tpl index ffbe96f..34945b4 100644 --- a/setup/sdk/spid-php.tpl +++ b/setup/sdk/spid-php.tpl @@ -532,18 +532,16 @@ return $button_li; } - public function insertCIEButton($size='default') { - echo " - - "; + public function insertCIEButton($size = 'L') { + $size = strtolower($size); + if ($size == 'default') { + $size = 'l'; + } + + echo " + \"Entra + Entra con CIE + "; } }