KoolReport's Forum

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

Export package throws a PhantomJS Exception #891

Open Nuvap SRL opened this topic on on May 27, 2019 - 9 comments

Nuvap SRL commented on May 27, 2019

Hello, I recently purchased the Export package to export my reports in PDF format. I installed it following the instructions step by step. However, when I try to use it in my program, it throws the following exception:

Fatal error: Uncaught Exception: Could not execute phantomjs in /var/www/html/kreport/koolreport/packages/export/Handler.php:72 Stack trace: #0 /var/www/html/kreport/koolreport/packages/export/Handler.php(237): koolreport\export\Handler->runPhantom('/var/www/html/k...', '/var/www/html/k...', '/var/www/html/k...', 'eyJkaXNwbGF5SGV...') #1 /var/www/html/kreport/KServerNextw.php(226): koolreport\export\Handler->pdf(Array) #2 {main} thrown in /var/www/html/kreport/koolreport/packages/export/Handler.php on line 72

Phantomjs (in the export directory) has 777 permissions. My program runs on a Linux environment. I could really use some help. Thank you so much!

KoolReport commented on May 27, 2019

If you use command line to go to "export/bin" folder and try to run

phantomjs -v

does it return version of phantomjs like 2.1.1?

Nuvap SRL commented on May 27, 2019

It gives me a weird error, which is the following:

KoolReport commented on May 27, 2019

That's strange, I have not seen this error before, if you run only "phantomjs", does it show console of phantomjs?

Nuvap SRL commented on May 27, 2019

I just realized I downloaded the wrong version of phantomjs (I work on a Mac but test programs on Linux). So, now PhantomJS works, but the result is a blank PDF. I'll just try out if I can get around this new problem, otherwise I'll open a new topic. Thank you so much!

KoolReport commented on May 27, 2019

sure!

Nuvap SRL commented on May 27, 2019

I tried running phantomjs -v and it gives me the same error as before. The same happens if I only run phantomjs. I'm in my 'export/bin' directory. It doesn't give me the exception at a browser level though. So, I guess there are still some problems related to phantomjs

Nuvap SRL commented on May 27, 2019

Also, maybe I need to mention I'm working on Linux (where my testing environment is located) through ssh.

Nuvap SRL commented on May 27, 2019

Ok, I solved installing phantomjs separately (in my /usr/bin folder) and setting the proper path in the exporting settings. Thank you for your help :)

KoolReport commented on May 27, 2019

Oh great! Some server requires phantomjs to be installed manually like you did.

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
help needed
solved

Export