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

The exit status code '127' says something went wrong: stderr: "PROT_EXEC|PROT_WRITE failed. #92

Closed
JSGarcia opened this issue Apr 13, 2015 · 2 comments

Comments

@JSGarcia
Copy link

Hi, I am generating PDF reports about the bundle knp_snappy, as it says in the title, so wkhtmltopdf command works perfectly in command mode but it does in the bundle, I get the following error:

The exit status code '127' says something went wrong:
stderr, "PROT_EXEC | PROT_WRITE failed.

I understand it is something related to permissions but do not know what I have to change to make it work.

my config.yml

knp_snappy:
    pdf:
        enabled:    true
        binary:     "/usr/bin/wkhtmltopdf"
        options:    []

My controller:

$html = $this->renderView('PanelBundle:Default:hotel-booking-summary.pdf.html.twig', array(
            'summary' => $summary,
            'agency' => $agency
        ));

        return new Response(
            $this->get('knp_snappy.pdf')->getOutputFromHtml($html),
            200,
            array(
                'Content-Type'          => 'application/pdf',
                'Content-Disposition'   => 'attachment; filename="file.pdf"'
            )
        );

I hope you can help me, greetings and thank you very much.

@akovalyov
Copy link
Contributor

@JSGarcia I see that you have also opened an issue on SO
Please, also check if your server is RedHat-based. I'd bet that you have issues with SELinux kernel.

EDIT:
You can check SELinux with sestatus
If it is the case - please, check http://wiki.centos.org/HowTos/SELinux#head-faa96b3fdd922004cdb988c1989e56191c257c01 and http://serverfault.com/a/328867

@akerouanton
Copy link
Contributor

Indeed it looks like permission issue with SELinux. I close due to inactivity.

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

No branches or pull requests

4 participants