Compatibility issues between H5P and PHP 8.1
Submitted by ojeon on Wed, 09/25/2024 - 22:28
Hello,
We use H5P extensively in both WordPress and our LMS. However, after upgrading our WordPress environment to PHP 8.1, we encountered an issue where all embedded H5P content is missing from the website.
I was wondering if there are any known compatibility issues between H5P and PHP 8.1, or if there are any steps we should take to resolve this.
papi Jo
Thu, 09/26/2024 - 10:25
Permalink
HelloYou write "WordPress and
Hello
You write "WordPress and our LMS" which LMS is that?
Anyway, I am running WordPress 6.6.2 with PHP 8.2.13 and H5P plugin 1.16.0 and all is working fine.
"all embedded H5P content is missing from the website" This is too vague, can you provide more precise details?
ojeon
Thu, 09/26/2024 - 19:37
Permalink
Hi Papi, My apologies for the
Hi Papi,
My apologies for the oversight. We are currently running WordPress (WPMS) 6.6.2 with PHP 8.1 and H5P plugin version 1.16.0. After upgrading to PHP 8.1, all embedded H5P content across our sites has disappeared, leaving only blank spaces without displaying any error. We tried upgrading to PHP 8.2.13 but still running into the same issue. I hope this helps.
otacke
Thu, 09/26/2024 - 22:10
Permalink
without displaying any
Have you checked the development console and the PHP error log? Cmp. https://snordian.de/2024/02/17/how-can-i-craft-an-effective-bug-report-for-h5p-components/
Have you checked the H5P settings dealing with embedding (just to make sure)?
ojeon
Thu, 10/03/2024 - 00:15
Permalink
Here is what I'm getting from
Here is what I'm getting from the console.
Unable to find constructor for: H5P.ImageHotspots 1.10
Uncaught TypeError: Cannot read properties of undefined (reading 'getCopyrights')
at H5P.getCopyrights (h5p.js?ver=1.16.0:1139:16)
at HTMLDivElement.<anonymous> (h5p.js?ver=1.16.0:174:30)
at Function.each (jquery.js?ver=1.16.0:2:2976)
at S.fn.init.each (jquery.js?ver=1.16.0:2:1454)
at H5P.init (h5p.js?ver=1.16.0:93:60)
at HTMLDocument.<anonymous> (h5p.js?ver=1.16.0:2879:11)
at e (jquery.js?ver=1.16.0:2:30005)
at t (jquery.js?ver=1.16.0:2:30307)
at Function.each (jquery.js?ver=1.16.0:2:2976)
at S.fn.init.each (jquery.js?ver=1.16.0:2:1454)
at H5P.init (h5p.js?ver=1.16.0:93:60)
at HTMLDocument.<anonymous> (h5p.js?ver=1.16.0:2879:11)
at e (jquery.js?ver=1.16.0:2:30005)
at t (jquery.js?ver=1.16.0:2:30307)
otacke
Thu, 10/03/2024 - 12:03
Permalink
These are (JavaScript) error
These are (JavaScript) error messages from the browser's development console. They merely indicate that the required library seems to not have been loaded. The reason is unclear though. If this is an error caused by some PHP 8.1 incompatibility, you should find a hint in the PHP error log. Another cause, however, may be other WordPress plugins that defer loading JavaScripts in order to optimize the site loading experience for the user. The order in which JavaScripts are loaded is crucial here, however, and if another plugin messes with the order, things can go south.
papi Jo
Tue, 10/08/2024 - 11:37
Permalink
Oliver wrote "Another cause,
Oliver wrote "Another cause, however, may be other WordPress plugins that defer loading JavaScripts in order to optimize the site loading experience for the user. "
In order to check that suggestion, the OP should disable ALL the WP plugins on their WP site; check that then the HP contents do work, and then re-enable those plugins one by one until the "culprit" is found.
ojeon
Wed, 11/06/2024 - 00:21
Permalink
I have disabled all WordPress
I have disabled all WordPress plugins and reinstalled H5P, but the issue still persists. Below is the PHP error I am encountering.
PHP Warning: PHP Startup: Unable to load dynamic library 'tidy.so' (tried: /usr/local/lsws/lsphp81/lib64/php/modules/tidy.so (/usr/local/lsws/lsphp81/lib64/php/modules/tidy.so: cannot open shared object file: No such file or directory), /usr/local/lsws/lsphp81/lib64/php/modules/tidy.so.so (/usr/local/lsws/lsphp81/lib64/php/modules/tidy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: Module "igbinary" is already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'json.so' (tried: /usr/local/lsws/lsphp81/lib64/php/modules/json.so (/usr/local/lsws/lsphp81/lib64/php/modules/json.so: cannot open shared object file: No such file or directory), /usr/local/lsws/lsphp81/lib64/php/modules/json.so.so (/usr/local/lsws/lsphp81/lib64/php/modules/json.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Startup: Unable to load dynamic library 'tidy.so' (tried: /usr/local/lsws/lsphp81/lib64/php/modules/tidy.so (/usr/local/lsws/lsphp81/lib64/php/modules/tidy.so: cannot open shared object file: No such file or directory), /usr/local/lsws/lsphp81/lib64/php/modules/tidy.so.so (/usr/local/lsws/lsphp81/lib64/php/modules/tidy.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning: Module "igbinary" is already loaded in Unknown on line 0
otacke
Wed, 11/06/2024 - 01:15
Permalink
These look like error
These look like error messages from LiteSpeed Web Server which seemingly indicate that the tidy extension for PHP is not installed.
ojeon
Thu, 12/12/2024 - 00:24
Permalink
I've installed the tidy
I've installed the tidy extension for PHP but still not loading. Any other suggestions?