Page 1 of 1

Can't add product images

Posted: Mon Apr 07, 2025 9:43 pm
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.

Re: Can't add product images

Posted: Tue Apr 08, 2025 7:59 am
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,

Re: Can't add product images

Posted: Tue Apr 08, 2025 9:44 pm
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.

Re: Can't add product images

Posted: Tue Apr 08, 2025 9:50 pm
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.

Re: Can't add product images

Posted: Tue Apr 08, 2025 11:10 pm
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.

Re: Can't add product images

Posted: Wed Apr 09, 2025 4:52 am
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.

Re: Can't add product images

Posted: Wed Apr 09, 2025 7:14 pm
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!

Re: Can't add product images

Posted: Thu Apr 10, 2025 10:28 am
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..

Re: Can't add product images

Posted: Sat Aug 02, 2025 11:21 pm
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 :)