• Resolved John

    (@johnmcole)


    Hello,

    I have a site on WP Engine which is having the exact problem noted in the following thread:

    https://www.ads-software.com/support/topic/plugin-works-only-after-emptying-tmp-folder-continued/

    I’ve been going through rounds with WP Engine support and they insist that its a problem with the wp-mpdf plugin itself and keep telling me to reach out to the plugin support.

    I’ve also tried setting up a cron function to clear the tmp folder on a daily basis and it works for a few PDFs and then the plugin functionality breaks again.

    Here’s the main error we’re seeing in the logs:

    [Mon Nov 25 16:13:53.885343 2019] [php7:error] [pid 28315] [client 207.46.13.252:42792] PHP Fatal error: Uncaught MpdfException: Can't open file /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/cache/tmp/dejavusanscondensed.GSUBGPOStables.dat in /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/mpdf/classes/otl.php:297\nStack trace:\n#0 /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/mpdf/mpdf.php(16212): otl->applyOTL('Heaven Chee', 255)\n#1 /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/wp-mpdf.php(251): mPDF->WriteHTML('</p> <div id="h...')\n#2 /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/wp-mpdf.php(477): mpdf_output('<p><!DOCTYPE ht...', true, true, '', '/nas/content/li...')\n#3 /nas/content/live/yettercoleman/wp-includes/class-wp-hook.php(288): mpdf_exec(true)\n#4 /nas/content/live/yettercoleman/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters(NULL, Array)\n#5 /nas/content/live/yettercoleman/wp-includes/plugin.php(478): WP_Hook->do_action(Array)\n#6 /nas/content/live/yettercoleman/wp-includes/template-loader.php(13): do_action('template_redire...')\n in /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/mpdf/classes/otl.php on line 297

    Has anyone identified why this is happening on WP Engine? Is there a fix or something else to try – or is the plugin simply not compatible with their hosting environment?

    Thank you,
    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fkrauthan

    (@fkrauthan)

    I don’t really see any reason why the plugin should work for a bit and then stop working. It sounds to me like WP Engine might be changing the User that executes the PHP once in a while and because of the permissions a different user is not allowed to read the cache anymore? But this would be weird too.

    Sorry that I can’t be of more help here. Maybe anyone else uses the plugin on WP Engine and has more insight into this.

    Thread Starter John

    (@johnmcole)

    Hi Florian,

    Thank you for your help with this. I went back to discuss with WP Engine and here is their latest reply:

    I did a bit more digging on this with my senior tech and took a closer look into the error message that we are seeing. Right now, in the error, it looks like the plugin is attempting to access the file /nas/content/live/yettercoleman/wp-content/plugins/wp-mpdf/cache/tmp/dejavusanscondensed.GSUBGPOStables.dat . However, when I look into the server in this directory that file doesn’t exist. As if the file has been removed or gone missing. We are not seeing anything specific on our end that would cause or block permissions for this plugin. In addition I confirmed that the php user doesn’t change and always remains www-data.

    In addition, I did a thorough search through our previous tickets relating to this plugin and there have been similar issues reported but no resolution was reached. I spoke further with one of our most senior techs and it was recommended that at this point an alternative plugin may be the best alternative solution. In a couple of the tickets that I went through, this was also our recommended solution. In addition I searched through previous forum responses with similar issues on our platform and was unable to locate a viable solution at this time. I did locate this plugin, https://www.ads-software.com/plugins/e2pdf/ as well as article here https://premium.wpmudev.org/blog/4-plugins-to-provide-pdfs-of-wordpress-posts-but-why-manual-is-better/ with additional recommendations that might be able to offer you a viable alternative solution.

    Can you think of anything else we can do here before considering another plugin solution?

    Best,
    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin works only after emptying tmp folder (continued again)’ is closed to new replies.