Announcement

#1 2022-06-08 15:55:30

landyvlad
Member
Brisbane, Australia
2017-08-01
32

403 error attempting to access my piwigo URL

G'day,

When I try to login here: https://landyvlad.net/piwigo/identification.php
I get a "403 Forbidden Access to this resource on the server is denied!"

The two most recent errors in the errorlog in the main piwigo directory are (undated) and show:

Can't connect to server
#1    my_error /home/landyvla/public_html/piwigo/include/common.inc.php(113)
#2    include_once /home/landyvla/public_html/piwigo/picture.php(10) in /home/landyvla/public_html/piwigo/include/functions_html.inc.php on line 388

(Copy here your environment details, found on your Piwigo page [Administration > Tools > Maintenance])
As I cannot access that page, I have collected the data from the cpanel as follows:

Piwigo version: unknown. Last updated around 12 months ago I think.
PHP version: PHP: 7.4
MySQL Server version: 10.3.35-MariaDB - MariaDB Server
Piwigo URL: https://landyvlad.net/piwigo/

Directory file permissions are set to 755 (that hasn't changed)

Help and suggestions are most welcome!

Oh and server error messages from today (via cpanel)

2022-06-08 23:33:30.173292 [INFO] [556827] [T0] [64.124.8.39:19017#APVH_landyvlad.net] File not found [/home/landyvla/public_html/404.shtml]
2022-06-08 23:33:30.173273 [INFO] [556827] [T0] [64.124.8.39:19017#APVH_landyvlad.net] File not found [/home/landyvla/public_html/robots.txt]
2022-06-08 23:31:47.061348 [INFO] [556828] [T0] [159.196.13.86:54872-H3:0D1B1ED41EEB6045-0#APVH_landyvlad.net:443] File not found [/home/landyvla/public_html/403.shtml]
2022-06-08 23:30:06.201951 [INFO] [556827] [T0] [159.196.13.86:54852-H3:4FA0632FBE4B9D1E-12#APVH_landyvlad.net:443] File not found [/home/landyvla/public_html/403.shtml]
2022-06-08 23:29:42.955880 [INFO] [556827] [T0] [159.196.13.86:54852-H3:4FA0632FBE4B9D1E-0#APVH_landyvlad.net:443] File not found [/home/landyvla/public_html/404.shtml]
2022-06-08 23:29:42.955852 [INFO] [556827] [T0] [159.196.13.86:54852-H3:4FA0632FBE4B9D1E-0#APVH_landyvlad.net:443] File not found [/home/landyvla/public_html/pw]
(snipped a bunch of irrelevant material from here to make post more concise)

I've had no problem accessing other things on that domain eg my wordpress site landyvlad.net/wp

Last edited by landyvlad (2022-06-10 04:36:16)


piwigo - because photobucket can suck my .....

Offline

 

#2 2022-06-08 19:40:55

erAck
Only trying to help
2015-09-06
2023

Re: 403 error attempting to access my piwigo URL

Make sure you don't have the POST request method on https://landyvlad.net/piwigo/identification.php forbidden somewhere/somehow, i.e. check .htaccess in piwigo/ and also in the domain's document root or even higher up.

It might also be a mod_security rule problem. If in doubt, ask your hosting provider.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2022-06-09 04:59:35

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

Where would I find  .htaccess in piwigo? I had a look but couldn't find it ?

Also I have no idea how to find out if the POST request method is forbidden somewhere/somehow? I wouldn't have done that on purpose, certainly.


piwigo - because photobucket can suck my .....

Offline

 

#4 2022-06-09 08:31:31

I_am_cats
Member
2022-04-14
27

Re: 403 error attempting to access my piwigo URL

landyvlad wrote:

Where would I find  .htaccess in piwigo? I had a look but couldn't find it ?

It's a hidden file at the root of your piwigo install.

Also I have no idea how to find out if the POST request method is forbidden somewhere/somehow? I wouldn't have done that on purpose, certainly.

Might be in that file somewhere.
Could also be a cPanel setting somewhere?

Has it worked before? If so, what changed between then and now?

PS: The logs you posted seem largely irrelevant.

Offline

 

#5 2022-06-10 02:30:11

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

OK I've snipped away most of the log part then, ... I had no idea what night or might not be useful :)

I've checked and there is no hidden .htaccess file in the piwigo directory which is landyvlad.net/piwigo None at all.

There is an htaccess file in my wordpres install landyvlad.net/wp (but obviously that's not the piwigo one).

There is no htaccess in the public_html directory which both of those sit in.


Yes it has worked before but as I don't know when specifically it stopped working (I haven't logged in for a few months - had no need to) I can't isolate anything which might have happened in the interim.
Possibilities - PHP  change (currently running 7.4)

not sure what else. Nothing I can think of.



Maybe I need an htaccess file.  Is there somewhere I can grab the 'normal' piwigo htacess file to put in that directory and see if it works?


Alternatively is there a means of upgrading piwigp via the back end (file manager in cpanel) which will NOT affect my image files or gallery structure?

I appreciate your help :)

Last edited by landyvlad (2022-06-10 04:37:10)


piwigo - because photobucket can suck my .....

Offline

 

#6 2022-06-10 11:11:03

erAck
Only trying to help
2015-09-06
2023

Re: 403 error attempting to access my piwigo URL

I can only repeat:

"It might also be a mod_security rule problem. If in doubt, ask your hosting provider."


Running Piwigo at https://erack.net/gallery/

Offline

 

#7 2022-06-11 12:29:11

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

Sorry mate I forgot to mention - the person I spoke to doesn't believe it is a mod-security issue.


piwigo - because photobucket can suck my .....

Offline

 

#8 2022-06-13 15:40:03

MartaW
Member
Poland
2022-03-20
24

Re: 403 error attempting to access my piwigo URL

landyvlad wrote:

Maybe I need an htaccess file.  Is there somewhere I can grab the 'normal' piwigo htacess file to put in that directory and see if it works?

I've never encountered anything like a 'normal' piwigo .htaccess file. But my experience with Piwigo is still limited.
Nevertheless I suspect that your problems have something to do with cPanel - how it manages your server, sites and certificates. I had to jump over several fences to make things work for me consistently.
And as having a specific .htaccess file in public_html solved most of my previous problems, try putting there (in public_html) a .htaccess file containing this:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} ^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Sectigo\ DCV)?$ [OR]
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


My photo gallery (powered by Piwigo): https://martaw-art.pl/gallery/

Offline

 

#9 2022-06-14 04:10:11

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

Thank you I will give that a go.

In that code though is some of it unique to your directory structure?
(?:\ Sectigo\ DCV)
(?:\ Ballot169)


piwigo - because photobucket can suck my .....

Offline

 

#10 2022-06-14 13:46:36

MartaW
Member
Poland
2022-03-20
24

Re: 403 error attempting to access my piwigo URL

landyvlad wrote:

In that code though is some of it unique to your directory structure?
(?:\ Sectigo\ DCV)
(?:\ Ballot169)

No, it is not.

Sectigo is Comodo - look into your certificate's 'Certification Path'. It says:

Sectigo (formerly Comodo CA)
   cPanel, Inc. Certification Authority
      landyvlad.net

DCV stands for Domain Control Validation.
See https://duckduckgo.com/?q=sectigo+dcv for explanation of how it works.

Allegedly the .well-known directory appears on all cPanel servers that are using the Comodo (now Sectigo) AutoSSL feature. Your site does use it, right?
Ballot169 refers to the domain validation methods that CAs (certification authorities) may use.
People around the world say that while the line with Ballot169 seems superfluous it is expected by cPanel especially for new/fresh certificates or around the time when they are due to be renewed.

Now - after I looked into your certificate (and compared it with mine) - I am assuming that both our host providers use roughly the same version/implementation of cPanel (and its certification authority). That's why I think that my tip may be useful to you.
But if not... there are so many reasons behind the obnoxious 403 error.
So if my solution does not work for you check this tutorial https://www.hostinger.com/tutorials/wha … -to-fix-it.

Last edited by MartaW (2022-06-14 13:55:40)


My photo gallery (powered by Piwigo): https://martaw-art.pl/gallery/

Offline

 

#11 2022-06-15 03:37:42

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

I've not had a chancre to try that yet, but will report back.  Thanks very much for your help I really appreciate it.


piwigo - because photobucket can suck my .....

Offline

 

#12 2022-06-21 13:12:23

MartaW
Member
Poland
2022-03-20
24

Re: 403 error attempting to access my piwigo URL

landyvlad wrote:

will report back

I am getting curious ;)
Still plenty of time till your certificate expires (on July 27).


My photo gallery (powered by Piwigo): https://martaw-art.pl/gallery/

Offline

 

#13 2022-08-04 05:39:55

landyvlad
Member
Brisbane, Australia
2017-08-01
32

Re: 403 error attempting to access my piwigo URL

HI, sorry for the lack of response I have been laid up in bed for  weeks with RSV (bad case of, not fun) but am improving now and kind of back on deck.

I haven't had a chance to try the above as yet but will do so when I get a chance - really busy catching up on work at the moment.
Cheers


piwigo - because photobucket can suck my .....

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact