Page 1 of 1

403 Forbidden error

Posted: Sat Oct 25, 2025 11:45 pm
by ArtcoInc
(Phoenix 1.0.3.0, installed on a WAMP server, PHP 7.4.33, static IP address 192.168.1.30, sub-directory "/AMT26")

I am receiving some 403 errors in the console when I access some categories or sub-categories:

Code: Select all

Get http://192.168.1.30/AMT26/images/          HTTP/1.1   403   Forbidden
Not every category, nor sub-category. I can not see any common trait for the ones that have the error vs the ones that don't.

Here's the long error message:

Code: Select all

GET
scheme     http
host           192.168.1.30
filename   /AMT26/images/

Address    192.168.1.30:80

Status                 403 Forbidden
Version               HTTP/1.1
Transferred        585 B (323 B size)
Referrer Policy    strict-origin-when-cross-origin
Request Priority  Low

Response Header (262 B)

HTTP/1.1 403 Forbidden
Date: Sat, 25 Oct 2025 23:16:04 GMT
Server: Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev
Content-Length: 323
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

Request Header (409 B)

GET /AMT26/images/ HTTP/1.1
Host: 192.168.1.30
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: image/avif,image/webp,*/*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://192.168.1.30/AMT26/index.php?cPath=8&ceid=t1gd1c0epqomra3mafbi85r33n
Cookie: ceid=t1gd1c0epqomra3mafbi85r33n; _ga_BGF4FHS33Q=GS2.1.s1760979181$o19$g1$t1760979194$j47$l0$h0; _ga=GA1.1.872744390.1749163349

TIA

Malcolm

Re: 403 Forbidden error

Posted: Sun Oct 26, 2025 6:07 am
by BrockleyJohn
You have some empty image fields.

The shop is creating img elements with a src attribute that points to the image directory. Since the htaccess forbids listing the content of that directory, you get a 403 for the image request.

Re: 403 Forbidden error

Posted: Sun Oct 26, 2025 10:07 am
by burt
Referer: http://192.168.1.30/AMT26/index.php?cPath=8

Something on this page wants to load an image that does not exist.
Check source code of this page for `img src=`
and find the one that is blank.

Re: 403 Forbidden error

Posted: Sun Oct 26, 2025 3:57 pm
by ArtcoInc
@burt @BrockleyJohn

Thank you VERY much! I never would have been able to figure this out otherwise!

A couple of questions ...

1) If I had not have found this, nor had done anything about it, what would have happened had this been a live site (besides a poor Google rating)?

2) How would I have known that this was an 'issue' if I wasn't looking at the console (or answered any of the dozens of emails I get from 'developers' offering to 'fix' my site)?

3) The root cause was leaving the Products Image (or Category Image) field empty in a couple of items/categories. Perhaps a warning is warranted?

Again, thank you!

Malcolm

Re: 403 Forbidden error

Posted: Sun Nov 09, 2025 5:50 pm
by burt
Sorry for delay in replying, only just noticed follow up Q's.

1. I don't know and wouldn't like to give incorrect advice
- It's just a missing image, after all - it's not really a massive deal breaker.
2. It would fill up your error log
- I'd hope all shopowners would glance at their error log every so often...in their hosting control panel.
3. I can't recreate in an up to date Phoenix
- whatever it is (if Core Code) may have been fixed somewhere in the last few years

Re: 403 Forbidden error

Posted: Sun Nov 09, 2025 10:14 pm
by ArtcoInc
Thank you.