Hi. I am having one more issue for today. Sorry abt that pls!
I am using Laravel 5.6 with Docker, Nginx, Php-fpm 7.2, Postgresql on Centos 7.
shell_exec is working
here is where phantom.js:
"/var/www/html/beauty.dev/vendor/koolphp/koolreport/koolreport/packages/export/bin/phantomjs"
I have installed via npm in: "/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs" - same error
Here is the command it trying to execute:
"/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs --ignore-ssl-errors=true /var/www/html/beauty.dev/vendor/koolphp/koolreport/koolreport/packages/export/pdf/pdf.js /var/www/html/beauty.dev/vendor/koolphp/koolreport/koolreport/packages/export/tmp/5b8e6bb0a295c2.tmp /var/www/html/beauty.dev/vendor/koolphp/koolreport/koolreport/packages/export/tmp/5b8e6bb0a2ba73.pdf here_is_token"
here is my Controller:
public function getpdf(Request $request)
{
$report = new BasicReport();
$report->run()
->export()
->settings(array(
"useLocalTempFolder"=>true,
// "phantomjs"=>"/usr/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs",
"resourceWaiting"=>2000,
))
->pdf(array(
"format"=>"A4",
"orientation"=>"portrait"
))
->toBrowser("report.pdf");
return view("basicreport",["report"=>$report]);
}
Here is content of the tmp folder:
ls -l
total 448
-rw-r--r--. 1 33 33 62305 Sep 4 14:14 5b8e6930daef22.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:17 5b8e69c9d800b2.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:17 5b8e69d8c1ee82.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:20 5b8e6a6d54fda2.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:24 5b8e6b5140de32.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:24 5b8e6b89a0d912.tmp
-rw-r--r--. 1 33 33 62305 Sep 4 14:25 5b8e6bb0a295c2.tmp
But when it tries to save .pdf it throws new \Exception("Could not execute phantomjs");
I am trying to go throw, but if I miss something please let me know.