New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tempDir setting is idioatic #701
Comments
This definition is in the So two levels up, and you are in the root directory. This folder exists to ensure it exists somewhere. Of course it is better to define it at a more suitable location. |
|
System wide temporary directory presents potential collisions of multiple mPDF instances used by different system users, especially on shared hosts. It also makes cleanup much harder. Custom temporary directory for each installation is safer. |
Using /tmp inside mPdf lib, where sources are located, is not the best idea from security point of view. |
It is recommended to use another folder, according to docs...: https://mpdf.github.io/installation-setup/installation-v7-x.html and https://mpdf.github.io/installation-setup/folders-for-temporary-files.html) |
The main argument against The default Its value can be changed on mPDF instantiation to any suitable value by user. It is possible |
As madorin says, normally the mPdf installation dir will only have RO rights (that is my situation for the #1047 ). And |
By the same token, people that have "3rd party libraries" problems is only the 3rd party library configuration issue and not the library's configuration issue. Changing a behaviour of code is much easier than changing behaviour of shared hosting provider. In another point of view, on a shared host with open_basedir in effect, your change would not help users of phpoffice/phpword in any way, as they would't be able to change the default in non-writable default temp dir anyway. I suggest proposing a change to phpoffice/phpword to allow changing mpdf settings or to accept a custom \Mpdf\Mpdf instance. |
To quote the previous comment,
I consider this discussion closed. |
That's not because one method is "mush easier" that is the best way to do
One year ago, and nothing ? |
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
…mpdf) Issue on mpdf library : mpdf/mpdf#701 (comment) Rejected PR on mpdf library : mpdf/mpdf#1047
In ConfigVariables.php
'tempDir' => __DIR__ . '/../../tmp',
Why should this directory exist? The default should be to use
sys_get_temp_dir
Passing ['tempDir' => sys_get_temp_dir()] as a argument to the sonstructor gets around it
The text was updated successfully, but these errors were encountered: