The pdf successfully downloads to where I want it to. However, I am getting many php warnings when using pdf cloud export.
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/189581fcb7c8ac21237e492618c87f55.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/7c6bd7c097b8a097521387ff77ceee36.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/6477a69291e53bdfa0ea501af56c5e0a.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/79f8d1792bdcb90589020c91804479f2.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/573fba7315e0423cce17cb649db3e70b.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/9d239a4fb27648cfc08aadd3d9560a51.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
[16-Aug-2021 23:27:39 UTC] PHP Warning: file_get_contents(http://localhost:8888/config/7fbbf5c44b32b33abe39f384f0594337.js): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /Users/keithko/Documents/code/kinder_reports/vendor/koolreport/cloudexport/vendor/chromeheadlessio/php-client/src/Exporter.php on line 192
I have useLocalTempFolder set to true, and I see the temp files being downloaded to a tmp config/tmp/611af94a11b3c
folder. However for some reason file_get_contents is trying to find it one folder outside.
It seems like the unique id isn't being added to the path? $tempDirName = uniqid();
in Exporter.php's saveTempContent
function.
email.php:
`
$file_directory = $_SERVER['DOCUMENT_ROOT']."/tmp_files/";
$report_template_str = "../../config/ReportPDF";
$file_name = $report_title."-".date("ymdhis").$_SESSION["user_id"];
$file_name .=".pdf";
$report->cloudExport($report_template_str)
->chromeHeadlessio(".....")
->settings([
"useLocalTempFolder" => true
])
->pdf([
"scale" => 0.5,
//"format" => "A4",
"landscape" => true,
])
->saveAs($file_directory.$file_name);
Any help is appreciated.