Git Product home page Git Product logo

Comments (7)

bahadurvaibhav avatar bahadurvaibhav commented on September 24, 2024

I am able to get this library to work only if I start my laravel project using
"php artisan serve"

If I try to access the API, or PHP files directly (via URL) then it is giving the issues mentioned in the above post
fwrite() .....
shell error 127

I have got it to work on a Windows server. There is still some issue in running it from Linux server.

from php-chrome-html2pdf.

spiritix avatar spiritix commented on September 24, 2024

Shell error 127 usually means that the command (resp. the binary) could not be found. Try to set the path to the node executable manually using the $converter->setNodePath() method.

from php-chrome-html2pdf.

bahadurvaibhav avatar bahadurvaibhav commented on September 24, 2024

Thanks for the reply

Tried that as well.

I had set the path like so. Let me know if this is correct
$converter->setNodePath('/home/ec2-user/.nvm/versions/node/v17.2.0/bin/node')
I even tried this
$converter->setNodePath('/home/ec2-user/.nvm/versions/node/v17.2.0/bin')

After I set the node path, I started getting this error
Shell error 126

from php-chrome-html2pdf.

spiritix avatar spiritix commented on September 24, 2024

Shell error 126 means your Node binary is missing executable permissions.

from php-chrome-html2pdf.

codinglife456 avatar codinglife456 commented on September 24, 2024

Hi @bahadurvaibhav, i am facing the exact same issue as you. May i know if you have resolved it and how?

from php-chrome-html2pdf.

bahadurvaibhav avatar bahadurvaibhav commented on September 24, 2024

I was not able to solve the issue, but I got it to run on server

I had to use this command in server (the same one I was using in local machine)
php artisan serve --port=8080

Then I was able to connect to my API using http://SERVER_IP:8080/....

from php-chrome-html2pdf.

codinglife456 avatar codinglife456 commented on September 24, 2024

I was not able to solve the issue, but I got it to run on server

I had to use this command in server (the same one I was using in local machine) php artisan serve --port=8080

Then I was able to connect to my API using http://SERVER_IP:8080/....

Oh, this work around doesn't seem applicable for me. So weird that it works just fine on local but not on the server. I have also updated the permission of all the files but it still doesn't work.

from php-chrome-html2pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.