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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Proc_open needs to be enabled for forms?

Started by Huub 8 years ago · 7 replies · 2953 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

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?

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

8 years ago

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.

2|690x418

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 14 hours ago
1 51 13 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago