Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary not found error after moving to prod server #54

Open
alexxtoh opened this issue May 16, 2020 · 3 comments
Open

Binary not found error after moving to prod server #54

alexxtoh opened this issue May 16, 2020 · 3 comments

Comments

@alexxtoh
Copy link

alexxtoh commented May 16, 2020

I installed phantommagick and phantomjs via composer on my dev server. All running well, had no issues.
But after copying my project to the live server I'm getting error 500. After investigating, I found the the error is generated at line 145 in Runner.php , verifyBinary function :
} elseif (Str::contains($uname, 'linux')) { if (! shell_exec(escapeshellcmd("which {$binary}"))) { return false; }

Now, I tried to manually set the binary path: $conv->setBinary("path/bin/phantomjs"); No change
I tried to comment the above, and have it return true to test, only to get the failure in another place using shell commands (in the run function of the same class). So it seems to me there's an issue with the shell commands?

Help! Any ideas why this happens? I don't seems able to unstuck this.
Thanks

EDIT: forgot to add that running other shell commands work. I.e.:
echo shell_exec(escapeshellcmd(" ls "));
So it seems that the which command is returning either false or null. Or it doesn't find the binary (which is there..). But this is where my understanding of this ends.

@thatal
Copy link

thatal commented Jun 2, 2020

give permission to binary file executable.

@mnabih
Copy link

mnabih commented Jun 14, 2020

image
this works

@wearecaramba
Copy link

Using Ubuntu 24.04.1, I was getting the error 'Auto configuration failed' when running 'phantomjs --version' on the command line.

Using 'OPENSSL_CONF=/etc/ssl/ phantomjs --version' worked, so I updated the setBinary path to:

->setBinary('OPENSSL_CONF=/etc/ssl /usr/local/bin/phantomjs')

and it now works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants