Answer the question
In order to leave comments, you need to log in
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}"
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question