I’m having an issue with getting an email form to send on my live server (Centos 7). It works locally perfectly, and when logged into my server as a superuser (root) I can send a test email from the command line and it arrives to my inbox (and a remote inbox not on the server) just fine. I cannot however get the form to submit through the browser.
I’m guessing it’s a permissions issue, and I’ve read the guide on fixing permissions but I’m not entirely sure what I should be doing to resolve it. I’ve checked and Apache is running as nobody:nobody, whilst my Grav site is running under the virtual host account name pinsite:pinsite.
Who/what do I need to give permission to?
So, after much tweaking, Googling and testing, I finally managed to get it working. Essnetially the form was timing out and the server was throwing a generic 500 error message. Here’s what I did to resolve it.
First I made sure my server was running PHP7+ by default. Originally I was just using .htaccess to switch to PHP7 for that domain. This normally works just fine, but to be safe I ensured the CLI was running 7.X too.
Then I ensured the files inside the bin
folder were executable with chmod +x bin/*
Finally, as mentioned here, I changed the Sendmail flag at the bottom of the plugin settings page from -bs
to -t
.
Now the form submits, the notification pops up and emails arrive as expected.
1 Like