I am using a Snappy PDF library in Laravel 5.7. Locally it works everything fine, but in my dev environment I get this error: The process has been signaled with signal "11". Till now I was not able to find a solution that would help me. This is my code in controller:
public function pdfReport(Request $request){
$pdf = \Snappy::loadView('index', compact(
'name', 'lname', 'date', 'address'
))
->setOrientation('portrait')
->setOption('margin-bottom', 0)
->setOption('margin-top', 0)
->setOption('margin-left', 0)
->setOption('margin-right', 0);
return $pdf->download(str_replace(' ', '', $request->description) . Carbon::now()->format('dYm_His') . '.pdf');
}
Any help is appreciated!!!
This is probably not related to the OP's question, but in case anyone else is getting this, it might be helpful:
In my case, the The process has been signaled with signal "11"
exception was linked to an infinite loop. I encountered this exception when running a test case that was stuck in a self-calling recursion.
More generally speaking, a signal 11
is a segmentation fault, and the exception is raised by the Symfony Process class. A segmentation fault is usually an illegal memory access and can be caused by a buffer or stack overflow.
So, in my case, it was a stack overflow due to the infinite recursion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With