Can't add product images

Open to all! Ask other shopowners for help.
Post Reply
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Can't add product images

Post by notgreat »

Installed Version: CE Phoenix v1.1.0.1
You are running the latest version of CE Phoenix.

Code: Select all

drwxrwsrwx.  5 ec2-user apache 16384 Apr  6 21:59 images
Image
Image

I have been able to upload images before but now I'm unable to and I'm not sure anything is different, it seemed to happen suddenly. As you can see, permissions are open for the images folder. I can see after attempting an upload that the image is not present in the directory.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Can't add product images

Post by burt »

If your images folder is chmod 777 which it appears to be, it could be some hosting problem.
Check your php error log for any messages.
Check your hosting error log for any messages.

Any messages in there will at least give us a clue.

Try an upload from somewhere else, eg the Advert Manager
https://phoenixcart.org/phoenixcartwiki ... rt_Manager

Trying that will also hep to give us a clue,
I am not here to build for you.
I am here to build with you. Let's help each other.
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Re: Can't add product images

Post by notgreat »

burt wrote: Tue Apr 08, 2025 7:59 am If your images folder is chmod 777 which it appears to be, it could be some hosting problem.
Check your php error log for any messages.
Check your hosting error log for any messages.

Any messages in there will at least give us a clue.

Try an upload from somewhere else, eg the Advert Manager
https://phoenixcart.org/phoenixcartwiki ... rt_Manager

Trying that will also hep to give us a clue,
I tried uploading a new favicon and it failed. The favicon directory is also 777 and for good measure I repeated the attempt after setting all files within the directory to 777.

I didn't find any associated messages in the php logs at /var/log/php-fpm or the httpd logs at /var/log/httpd. I'm self hosting on an AWS EC2 instance running Amazon Linux 2023.
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Re: Can't add product images

Post by notgreat »

I don't see anything relevant in journalctl either:

Code: Select all

[root@www ec24a86fddd8d98105a362058e714a80]# journalctl --since -1min
Apr 08 21:48:16 www.notgreat.net systemd[1]: Starting refresh-policy-routes@enX0.service - Refresh policy routes for enX0...
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Starting configuration refresh for enX0
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: [get_meta] Querying IMDS for mac
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Got IMDSv2 token from http://169.254.169.254/latest
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: [get_meta] Querying IMDS for mac
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Got IMDSv2 token from http://169.254.169.254/latest
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Using existing cfgfile /run/systemd/network/70-enX0.network
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: [get_meta] Querying IMDS for mac
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Got IMDSv2 token from http://169.254.169.254/latest
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: [get_meta] Querying IMDS for mac
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Got IMDSv2 token from http://169.254.169.254/latest
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: [get_meta] Querying IMDS for network/interfaces/macs/02:10:02:20:77:e3/local-ipv4s
Apr 08 21:48:16 www.notgreat.net ec2net[485659]: Got IMDSv2 token from http://169.254.169.254/latest
Apr 08 21:48:16 www.notgreat.net systemd[1]: refresh-policy-routes@enX0.service: Deactivated successfully.
Apr 08 21:48:16 www.notgreat.net audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=refresh-policy-routes@enX0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? te>
Apr 08 21:48:16 www.notgreat.net audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=refresh-policy-routes@enX0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? ter>
Apr 08 21:48:16 www.notgreat.net systemd[1]: Finished refresh-policy-routes@enX0.service - Refresh policy routes for enX0.
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Re: Can't add product images

Post by notgreat »

I have it figured out: For some reason, Phoenix doesn't like this particular image as a PNG, despite it showing just fine in the browser. I converted it to a JPG and it's working now. Maybe it has something to do with this image having photographic data in it while my others are graphics with only a few colors? Seems like a bug. I'd post the image here but it's highly political and I don't want to upset anyone.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Can't add product images

Post by ecartz »

notgreat wrote: Tue Apr 08, 2025 11:10 pm Phoenix doesn't like this particular image as a PNG,
You might check the size of the image. PHP has limits on the file size. They are configured on a per server basis usually (I think you might be able to configure them per directory). Anyway, a lossless PNG might exceed the size that the server will allow. The lossy JPEG version is probably smaller.

You can talk to your host about changing the file size limits if needed.

Another alternative if it's only one image would be to upload a smaller image with the same name and then use FTP or the host's file manager to copy the larger image overtop it.
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Re: Can't add product images

Post by notgreat »

ecartz wrote: Wed Apr 09, 2025 4:52 am
notgreat wrote: Tue Apr 08, 2025 11:10 pm Phoenix doesn't like this particular image as a PNG,
You might check the size of the image. PHP has limits on the file size. They are configured on a per server basis usually (I think you might be able to configure them per directory). Anyway, a lossless PNG might exceed the size that the server will allow. The lossy JPEG version is probably smaller.

You can talk to your host about changing the file size limits if needed.

Another alternative if it's only one image would be to upload a smaller image with the same name and then use FTP or the host's file manager to copy the larger image overtop it.
You're right, it's over 2MB which is way bigger than any of the other images. As I'm self-hosted I could change the limit but I think it's better to switch this one to JPG. Thanks!
14Steve14
Senior Contributor
Posts: 922
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Can't add product images

Post by 14Steve14 »

Why not use something like webp files rather than jpg. They are much smaller and will lead to faster page loading inf you have an image heavy page..
notgreat
Member
Posts: 10
Joined: Mon Mar 31, 2025 11:50 am
Phoenix Version:
Has thanked: 4 times

Re: Can't add product images

Post by notgreat »

14Steve14 wrote: Thu Apr 10, 2025 10:28 am Why not use something like webp files rather than jpg. They are much smaller and will lead to faster page loading inf you have an image heavy page..
I guess my age is showing...

Thanks for the suggestion :)


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