403 Forbidden error

Open to all! Ask other shopowners for help.
Post Reply
ArtcoInc
Contributor
Posts: 119
Joined: Fri Oct 25, 2019 4:19 pm
Phoenix Version: v1.0.3.0
Has thanked: 86 times
Been thanked: 17 times

403 Forbidden error

Post 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

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
BrockleyJohn
Certified Developer
Posts: 173
Joined: Mon Mar 01, 2021 5:37 pm
Phoenix Version:
Has thanked: 2 times
Been thanked: 30 times

Re: 403 Forbidden error

Post 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.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 403 Forbidden error

Post 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.
I am not here to build for you.
I am here to build with you. Let's help each other.
ArtcoInc
Contributor
Posts: 119
Joined: Fri Oct 25, 2019 4:19 pm
Phoenix Version: v1.0.3.0
Has thanked: 86 times
Been thanked: 17 times

Re: 403 Forbidden error

Post 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
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 403 Forbidden error

Post 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
I am not here to build for you.
I am here to build with you. Let's help each other.
ArtcoInc
Contributor
Posts: 119
Joined: Fri Oct 25, 2019 4:19 pm
Phoenix Version: v1.0.3.0
Has thanked: 86 times
Been thanked: 17 times

Re: 403 Forbidden error

Post by ArtcoInc »

Thank you.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply