Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Proc_open needs to be enabled for forms?

Started by Huub 8 years ago · 7 replies · 3079 views
8 years ago

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?

8 years ago

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

https://imgur.com/a/aZJoy

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

last edited 02/20/18 by Huub
8 years ago

Anyone has an idea?

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

8 years ago

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?

8 years ago

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.

8 years ago

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 protected]
to: [email protected]
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

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 days ago
2 80 2 days ago
General · by Andy Miller, 6 days ago
0 145 6 days ago
General · by Veehem, 1 week ago
0 144 1 week ago
General · by milkboy, 1 week ago
0 138 1 week ago
General · by ian russell, 2 weeks ago
2 226 2 weeks ago