Unexpected server response. PDF.js on PHP 8.x

Forminator Forms Resolved
25 January, 2023 03:42:26
Alain Melsens
Topics: 8
Messages: 50
Hello,
After filling in a Forminator form, since I switched from PHP 7.4.33 to PHP 8.2.1, I get an Unexpected server response. PDF.js v2.6.347 (build: 3be9c65f) error and no PDF file is generated. See screencapture in attachment.
With PHP 7.4.33 and the PHP 7 versions before it worked without problems. It is identically the same website and all other functions work as before. I can switch from PHP 7 to PHP 8 with the same website. I get the same problems on all existing PHP 8. x versions.
What could be the cause of the PDF viewer not working now?
I am working with the latest WordPress version and all Plugins are updated to the latest version. I am using an E2PDF with paid licence. I’m working on Windows Servers with IIS version 10.
I am currently testing on a localhost environment so users are not disturbed. Since PHP 7.4.x is no longer further supported, it is necessary to switch to PHP 8.x soon. But given the current problem, I cannot switch completely.
Thanks in advance for any useful hints and/or solutions.
25 January, 2023 03:43:37
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Are you able to check your website error.log for Fatal Errors as usually it must be logged there?

It can be caused by some missing PHP extension or by some function incompatibility.

P.S. E2Pdf was successfully tested with PHP 8.1 but not yet with 8.2.
We would really appreciate your feedback at WordPress.org!
25 January, 2023 03:51:21
Alain Melsens
Topics: 8
Messages: 50
Thank you for your quick reply.
Perhaps you mean a PHP error log file?
I can't put an error log file with .log or neither .txt extension. How can I send you the error log file to you?
I also tested this with PHP 8.1.14 and I get the same error message.
25 January, 2023 03:52:15
E2Pdf
Support
Topics: 7
Messages: 3163
Send it please to mail: [private] or zip, and attach it to the next message.
We would really appreciate your feedback at WordPress.org!
25 January, 2023 03:56:38
Alain Melsens
Topics: 8
Messages: 50
Ok, I just sent the PHP error file with an email message.
25 January, 2023 04:11:43
Alain Melsens
Topics: 8
Messages: 50
Indeed, when I turn on the PHP 8 warnings and error messages, I get other errors that I don't get when using PHP 7.
I will send you the list of these via email.
25 January, 2023 04:37:21
E2Pdf
Support
Topics: 7
Messages: 3163
We currently sent a reply to your email, so it's better to communicate via it as it could be need some other additional info to identify the issue.

P.S. We are currently doing additional checks on our side for compatibility with PHP 8.2.
We would really appreciate your feedback at WordPress.org!
25 January, 2023 06:19:27
Alain Melsens
Topics: 8
Messages: 50
Thanks to your reports that apparently PHP libraries or PHP extensions were out of order, I investigated and it was correct.
I might not have paid enough attention when I copied and pasted an ini file from PHP 7.x to PHP 8.x. In it were old and therefore wrong assignments that had caused these problems.
Now I have properly compared and improved all PHP extensions where necessary and the problems are solved.
Problems are solved now. The pdf file is now properly constructed and displayed without any error message.
This ticket may be closed now.
Thank you very much for your great and fast support! ;)
Have a nice day.