Hello,
We did an installation with PHP8 and nginx, and metadata for SP are not available due to an use of a deprecated function :
2022-03-04 16:11:41.482 ** ERROR ** [V9.3.1] ERROR ** 2022-03-04 16:11:41.482 ** ERROR ** [V9.3.1] on file '/var/www/html/sso/lib/Saml2/Utils.php' at line (143) 2022-03-04 16:11:41.482 ** ERROR ***** [V9.3.1] cause = Function libxml_disable_entity_loader() is deprecated
Does a workaround exist to stay on php8, and get those metadata ?
Regards
This issue should not happen on V9.4.3
(we wrote a workaround)
Regards.
Hello babynus,
We did the upgrade in our dev environment, and the issue is still present.
2022-03-07 11:43:00.728 ===== TRACE ===== NEW CONNECTED USER 'admin'
2022-03-07 11:43:35.420 ** ERROR ** [V9.4.3] ERROR **
2022-03-07 11:43:35.420 ** ERROR ** [V9.4.3] on file '/var/www/html/sso/lib/Saml2/Utils.php' at line (143)
2022-03-07 11:43:35.420 ** ERROR ***** [V9.4.3] cause = Function libxml_disable_entity_loader() is deprecated
We are using php8, and libxml_disable_entity_loader() is deprecated
Regards
Change code on file projeqtor/sso/lib/Saml2/Utils.php, lines 143-145 from
$oldEntityLoader = libxml_disable_entity_loader(false); $res = $dom->schemaValidate($schemaFile); libxml_disable_entity_loader($oldEntityLoader);
to
if (version_compare(phpversion(), '8.0.0', 'schemaValidate($schemaFile); if (version_compare(phpversion(), '8.0.0', '<')) libxml_disable_entity_loader($oldEntityLoader);