Forum

libxml_disable_enti...
 
Notifications
Retirer tout

libxml_disable_entity_loader is depecated in php8

4 Posts
2 Utilisateurs
0 Reactions
1,488 Vu
(@support_infogerance)
Posts: 8
Active Member
Début du sujet
 
[#8119]

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


 
Posté : 4 Mar PM 18:033
(@babynus)
Posts: 14952
Membre Admin
 

This issue should not happen on V9.4.3
(we wrote a workaround)
Regards.


 
Posté : 4 Mar PM 19:033
(@support_infogerance)
Posts: 8
Active Member
Début du sujet
 

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


 
Posté : 7 Mar PM 13:033
(@babynus)
Posts: 14952
Membre Admin
 

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

 
Posté : 14 Mar AM 02:033
Share:
Retour en haut