Proc_open needs to be enabled for forms?

Hello,

I am trying to build a small blog website with a small form to subscribe to newsletter. When I try to send the form data it gets the next error:

proc_open() has been disabled for security reasons

Now I asked my hosting to enable this but they told me to thoroughly check if there is another solution because enabling the proc_open() gives a lot of security issues. Is there another solution for this?

I can’t find any explicit use of proc_open() in our code so not sure what is calling that, or why it works for 99.9% of everyone but not you. Was there any other details in the error message?

Thanks for the reply. I have attached a screenshot with the error itself:

I think I have made a mistake regarding the forms, I think it’s because of the mail function it errors.

Anyone has an idea?

I tried using SMTP but that is not working via Gmail or Mailgun. Both connections refused.

Hi,

I copied the files /templates/modular/form.html.twig and / templates/form.data.html.twig from Deliver Skeleton and got the same error…
Am I missing some additional files?

To confirm where the error could be I installed the deliver skeleton to test the form and it gives an error: 0 - Unsupported sendmail command flags [/usr/sbin/sendmail]. Must be one of “-bs” or “-t” but can include additional flags.

Any help is appreciated?

I didn’t found a solution. End up removing Grav and went to another platform. Sad but documentation is really lacking. Good luck with the problem, I hope you do find a solution.

Hi Uzi,

Thanks for the reply!
Got it to work. The problem was with security restritions of the server. Had to change the email processing from sendmail to smpt.

If it doesn’t exist, you’ll have to create: /user/config/plugins/email.yaml

Add:
+++
enabled: true
from: email@server.domain
to: email@server.domain
mailer:
engine: smtp
smtp:
server: mail.server.com
port: 587
encryption: none
user: user
password: pa$$w0rd
+++
More info @ https://github.com/getgrav/grav-plugin-email/blob/develop/README.md

Hope it helps anyone with the same problem.

Cheers
Pedro

It actually does not work for me either. I migrated a Grav site from a hosting to another and started having the exact same problem, and didn’t change anything.

The errors says that proc_open() has been disabled for security reasons so I asked my new hosting provider to fix that and see if that works.