Support » Plugin: wp-mpdf » Write permissions, warnings and updates

  • Resolved shortster


    I (and unfortunately my client) keep having issues with warnings during the use of this plugin. Although this is (almost) entirely my own fault, I hope there might be a way to make the whole thing a bit more user friendly.

    To use wp-mpdf correctly one has to set writing-permissions to certain folders. According to the installation instructions: wp-mpdf/cache AND wp-mpdf/tmp.
    Another warning informed me that wp-mpdf/mpdf/graph_cache should also have writing-permissions. This is not in the installation instructions.

    After updating the plugin this has to be done again. Which is where I go wrong, as I tend to forget there should be done some manual steps after hitting the update button…

    Would it be possible for the plugin to use a standard wordpress folder like ‘uploads’ to handle its writing stuff? Or instruct the user to create a folder inside its theme folder for wp-mpdf to use? This way updates to the plugin will not destroy the folder permissions, and the plugin will keep on working.

    Just a thought, and thanks for your great work on this plugin.

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


    The main problem is that the upload folder can be accessed by everyone. So we still need a tmp folder within the Plugin. I already changed the system a lot to only need one folder with write permission instead of three in the previous version. But I can think about looking for a tmp folder in the template directory. And if that folder exists it will use that folder. But I can’t promise when I have time to implement that.

    Good point on the uploads folder.

    A primary check for all writable wp-mpdf folders within the theme folder would be awesome.

    Plugin Author fkrauthan


    Hello, I’ve added that option to plugin version 3.1 which should be ready later today. It will now check first for a writable dir cache within the plugin directory. If that dosn’t exists it will try a writable dir called cache within the wp mpdf template folder.

    Hi again,

    Thanks a lot for the update on the cache and tmp dirs, however I think there is still a little bug in the code. At least on my test server I’m getting warnings on the tmp path which tries to resolve to: /home/pathtomywpinstall/wp-content/plugins/wp-mpdf/../../wp-mpdf-themes/cache/ /tmp

    Note the double slashes with the space in between at the end of the path.

    When I look in the code of wp-mpdf.php I see on line 127:

    define('_MPDF_TEMP_PATH', $cacheDirectory . ' /tmp/');

    Shouldn’t this be without the space and slash?:

    define('_MPDF_TEMP_PATH', $cacheDirectory . 'tmp/');

    It seems to work for me like this. What’s your take on this one?

    Plugin Author fkrauthan


    Ok that should be fixed with version 3.1.2

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Write permissions, warnings and updates’ is closed to new replies.