KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Problem facing while creating pdf file on nginx server #2233

Open Nilesh opened this topic on on Jul 27, 2021 - 2 comments

Nilesh commented on Jul 27, 2021

mkdir(): open_basedir restriction in effect

i am using cloudExport package

Nilesh commented on Jul 27, 2021

mkdir(): open_basedir restriction in effect. File(/tmp/6100165d47944) is not within the allowed path(s): (/home/admin/web/ledgersbook.com/public_html:/home/admin/tmp)

Sebastian Morales commented on Jul 28, 2021

It looks like your server doesn't permit the PHP process to create a sub directory in the system temp. Pls to use a local temp one like this:

    $report->cloudExport($myReportPdfview)
    ->chromeHeadlessio($secretToken)
    ->settings([
        'useLocalTempFolder' => true, // use a local temp directory
        'autoDeleteLocalTempFile' => true,
        "pageWaiting" => "networkidle2", //load, domcontentloaded, networkidle0, networkidle2
    ])
    ->pdf($pdfOptions)
    ->toBrowser($filename)
    ;

Pls try this and let us know if it works for you. Tks,

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None