Contact Form 403 NOT a Permissions Issue

I host https://www.globalcompassionfoundation.org on Stablehost. This page https://www.globalcompassionfoundation.org/contact-form/ used to work but now returns 403 page. I had hoped a security certificate issue being fixed would fix this as well. It didn’t.

I tried various PHP versions (5.1 5.3, 5.6, 7.4, 8.3) with no change. I created another contact form, with the same result.
I’ve deleted contact-form folders to force new ones with assumed proper permissions. I’ve checked the folders and find all folders are 0755 and files are 0644 as they should be.

Stablehost techs spent time checking the file permissions and PHP versions but they say they haven’t added any PHP restrictions recently.

The only thing I haven’t done is look at server logs because I’ve never done that. I’m not sure what line of code is triggering the 403 and suspect a log could help discover that.

I’m resorting to using an informational only contact page and leaving the above page on the server for others to look at for me but hidden from other users by removing from the menu.

This form used to work but stopped on its own (ie. I don’t remember changing this page… it just didn’t work one day.) I know, that means it probably isn’t a RapidWeaver issue. Anyway, I hadn’t made changes to the page until I had to delete the folders to force good permissions.

I’m using RW 9.3.4. Any advice would be appreciated.

Hi @RandyChev,

We can’t see anything from where we are, as visitors. The request to the contact form gets rerouted to the 403 page generated by the Lightspeed hosting software that your hoster uses, and obscures what’s going on to outsiders. Only you and your hoster can see what’s going on.

My advice would be to contact your hoster and check your folder permissions, but you’ve done that. That’s really all you can do at this point, other than a complete reset of the folder structure, and the .htaccess file.

You do say that the permission problem automatically appears when you create a completely new contact form - does this also happen when you create another page type, like a standard text page? It could be that the theme you’re using (Kiki?) is causing this.

Cheers,
Erwin

@Heroic_Nonsense,

Thanks for the reply. I created a styled page called “Connect With Us” that has all the info on the contact page except it doesn’t provide the php form to submit. It doesn’t have any problem with permissions so I suspect something with the PHP code is referencing a routine that is stored outside its authorized folder. (I know something of permissions and coding but not in the age of server side processing. I learned some languages and scripting in my 20s & 30s and now I’m 65 so I know enough to be dangerous.) That said, I’m not sure what the .htaccess file is used for. With the “.” at the start I assume it’s hidden as well. Location?

Anyway the new styled contact page may be good enough for the non-profit I do this for anyway but it always bugs me when I have to work around a “bug” like this.

Thanks again.
Randy

Hi @RandyChev,

The .htaccess file is indeed hidden, and is located in the root of your website’s folder structure (NOT the root of your webserver!). Basically it controls how requests are routed, and block certain pages from being accessed in certain ways… it’s pretty powerful.

There are quite a few how-to’s online that explain what you can do with it and how to do it.

In theory, the .htaccess file could include a statement that blocks PHP from being executed, or a simple reroute to the 403 page. If so, you’ll see (a part of) the contact page’s URL and a statement that looks a bit like this:

Redirect 301 <your contactpage> <some other URL that doesn't doesn't actually exist>

or

RewriteEngine On
rewritecond %{http_host} ^j<your contact page's URL>
rewriteRule ^(.*) <some non-existant URL>/$1 [R=301,L]
type or paste code here

Cheers,
Erwin