Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

libxml_disable_enti...
 
Notifications
Clear all

libxml_disable_entity_loader is depecated in php8

4 Posts
2 Users
0 Reactions
1,509 Views
(@support_infogerance)
Posts: 8
Active Member
Topic starter
 
[#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


 
Posted : 04 Mar 2022 18H25
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

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


 
Posted : 04 Mar 2022 19H28
(@support_infogerance)
Posts: 8
Active Member
Topic starter
 

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


 
Posted : 07 Mar 2022 13H49
babynus
(@babynus)
Posts: 14966
Main Contributor 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);

 
Posted : 14 Mar 2022 2H04
Share:

Scroll to Top