Can't download the PDF file in the due to cwd issue in Laravel Octane server with Swoole

78 Views Asked by At

I am using Laravel Octane and laravel-dompdf to generate the PDF. This was working fine when I was using the PHP-FPM and when I replaced PHP-FPM with Laravel Octane with Swoole, it says The provided cwd "" does not exist.. There are issue with Symfony Process as the current working directory is set to empty. And it's not allowing to download the PDF file. When I dump the response before the download code, the HTML for the PDF is generated properly.

How can I set the current working directory globally for all the Swoole processes, so that I don't get such issues for every process?

0

There are 0 best solutions below