K
K
Keliorw2021-11-04 17:23:25
PHP
Keliorw, 2021-11-04 17:23:25

How to enable writing temporary mpdf files to lambda?

When mpdf is running, my lambda crashes with this error, I tried to add write permissions (744 and 777) in the lib itself at all times where it creates files and directories.


{
"errorType": "Mpdf\\MpdfException",
"errorMessage": "Temporary files directory \"/temp/mpdf\" is not writable",
"stackTrace": [
"#0 /var/task/vendor/mpdf/ mpdf/src/ServiceFactory.php(56): Mpdf\\Cache->__construct()",
"#1 /var/task/vendor/mpdf/mpdf/src/Mpdf.php(1066): Mpdf\\ServiceFactory- >getServices()",
"#2 /var/task/inc/GeneralController.php(152): Mpdf\\Mpdf->__construct()",
"#3 /var/task/index.php(30): GeneralController ->Generate_pdf()",
"#4 /var/task/vendor/bref/bref/src/Runtime/Invoker.php(34): Bref\\Runtime\\FileHandlerLocator->{closure}()",
"#5 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(107): Bref\\Runtime\\Invoker->invoke()",
"#6 /opt/bref/bootstrap.php(43): Bref\\Runtime\\LambdaRuntime->processNextEvent()",
"#7 {main}"
]
}


Question following:
How to make so that liba could create the file necessary to it and then to delete?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vilinyh, 2021-11-05
@Keliorw

/tmp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question