Closed holzfelix closed 4 years ago
Hi! Thank you for your bug report. Does this happen due to a reached memory limit in WP? Does the error still happen if you increase the memory_limit
of PHP?
We are currently rewriting the PDF download with RAM usage optimization in mind. This is not entirely done yet because some server-side issues need to be solved. If increasing the memory limit for now helps, the optmization will help you later.
Best regards!
Ram is set to 4GB for the website. That should be enough for PDF creation or?
That is indeed enough, yeah. Is there anything in the Apache error.log? I could imagine an output before the Content-Type headers were sent. If that is the case, you would see a message like headers already sent in ...
.
There is stuff like that. Maybe permission issue? .. To which files / folders does the plugin need writing access? .. Nothing changed at all it's still default settings.
But errors are not in Apache error log. Those are in PHP 7.2 log
[17-May-2020 12:33:48] WARNING: [pool ] child 5017 said into stderr: "NOTICE: PHP message: PHP Warning: chmod(): Operation not permitted in /var/www/vhosts//httpdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 168"
[17-May-2020 12:57:17] WARNING: [pool ] child 5958 said into stderr: "NOTICE: PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts//httpdocs/wp-content/plugins/onoffice-for-wp-websites/plugin.php:154) in /var/www/vhosts//httpdocs/wp-includes/pluggable.php on line 1281"
[17-May-2020 12:57:17] WARNING: [pool ] child 5958 said into stderr: "NOTICE: PHP message: PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts//httpdocs/wp-content/plugins/onoffice-for-wp-websites/plugin.php:154) in /var/www/vhosts//httpdocs/wp-includes/pluggable.php on line 1284"
The onOffice for WP Websites plugin does not write on the file system. Do you have a caching plugin running? Since our plugin does not stop script execution after delivery of the PDF has completed, I have the theory that another plugin wants to send headers (ETag or anything other that deals with caching) after delivery of the PDF has begun.
Does changing this:
echo $pDocumentResponse->getBinary();
into this
echo $pDocumentResponse->getBinary();
die();
in plugin.php
line 154 help?
Resolved in release v2.7.0.
Dear OnOffice Team,
currently there is an error with the WordPress plugin. If you try to open the PDF Expose there is a PDF error.
How to get the PDF back as Base64 string or? Could be at the start with the % being or it is still a trailing space which has to be removed with trim.
Browser does not play a role throughout the same problem.
Is there already a solution for this? It is very unpleasant for customers.
I hope for quick help
Many thanks in advance.