Jump to content

Unable to upload PNG files of a certain size


Go to solution Solved by Westfield Sports Car Club,

Recommended Posts

We have upgraded 2 days ago to 4.6.8 and since then we've noticed that some users are unable to upload images like they were used to.  I've had a look at our image settings and they are what they've always been

1635332751_Screenshot2021-11-08at17_55_21.thumb.png.0f0a38627bd0c080fb50d97c67a80be8.png

and if I try to upload a JPEG of 5000x3335, it resizes it just fine to the maximum (ratio) size and shows the preview

712108290_Screenshot2021-11-08at17_58_21.png.0c0d645ef50daf1b44b81ab7020f5a58.png

If I try a PNG of similar (4816 × 4784) size, it fails

82734969_Screenshot2021-11-08at17_59_50.png.745ab73342a16a7bc6b6b37ae5e3641f.png

 

I then tries resizing the PNG to smaller size and it fails at 3000x2000, but at 1500x1000 it works?!?

1837910272_Screenshot2021-11-08at18_01_27.png.ed3d9ca39a6214b63bdb7de3a64e4fc7.png

 

I can't seem to find what's going on here that causes those larger (dimensions, not filesize) PNG files to fail.  Anyone able to help?

 

Link to comment
Share on other sites

Are you receiving a "-200" error or any further errors? Are you receiving any errors in your System Log? Are you using GD or Imagemagick? If any changes were made to your server, it is common that I see some hosting providers fail to install PNG delegates. That may be presented in the System Log for you to review.

Link to comment
Share on other sites

Thank you for your reply.

When uploading you do not get a -200 error, or any errors in fact.  All you get is the broken image image as shown above.  When you commit the post, it will actually become a 0 byte upload.

There are no errors in the System Log with regards to the upload.

We're using GD.

We control the host/server ourselves, which has not recently changed.

Link to comment
Share on other sites

I can find no errors in the apache error log, except for a few times this one:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/forum/public_html/forum/system/Db/Select.php on line 498, referer: https://forum.wscc.co.uk/forum/

Note, this error only occurred 3 times today, and none assigned to my own IP address.  I however increased the memory_limit value in php.ini to 256M first, and now to 512M and with neither increased values has it mattered in regards to the uploading of my PNG test file.

 

I was hoping to see the GD error somewhere, but I've drawn a blank.

Link to comment
Share on other sites

6 minutes ago, Westfield Sports Car Club said:

I can find no errors in the apache error log, except for a few times this one:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/forum/public_html/forum/system/Db/Select.php on line 498, referer: https://forum.wscc.co.uk/forum/

Note, this error only occurred 3 times today, and none assigned to my own IP address.  I however increased the memory_limit value in php.ini to 256M first, and now to 512M and with neither increased values has it mattered in regards to the uploading of my PNG test file.

 

I was hoping to see the GD error somewhere, but I've drawn a blank.

If you remove the resize settings in the ACP and upload the same file does it upload? If so, definitely something that would require more in depth review by yourself or your server administrator.

Link to comment
Share on other sites

The memory limit has been increased to 512M (from 128M), but as said above, this made no difference.

The problem is that we're running our host at an older Ubuntu version (16.04.7 LTS), managed by an older version of VirtualMin (5.05).  We no longer have an (easy) upgrade path on this and although it has worked for years without issue, I knew the warnings in the ACP about using an older PHP (7.3) would eventually mean that we need to look at upgrading this server the hard way.  And it looks that with the onset of 4.6.8 that has now made it visible to the end users.

Link to comment
Share on other sites

@Westfield Sports Car Club Just get a new server (dedicated or vps whatever you require) set up a new OS and all the bits and bobs (mariadb, firewalls and mail etc) and install IPS and migrate the DB over - and then alter the DNS for the new IP address - Done this a good few times now and its relatively painless...... with little downtime.......

Or move to IPS hosting and all your server headaches will go away - we did this on one of our forums and its been very good....

Link to comment
Share on other sites

  • 2 months later...

Update (sorry it took a while, but some matters were not in my control).

We've taken a backup of our original server and virtualised it.  We then upgraded this from 16.04 to 18.04 to 20.04 and are now running the latest PHP (8.1.2) and the admin panel is now no longer complaining about our PHP being out of date.  I also managed to install the PHP Imagick module and activated this on the Image Settings.

 

However, we still can not upload the same images that persistently fail.  This is the error that is shown in the System Logs

1869703790_Screenshot2022-01-28at08_44_37.thumb.png.2476150ad83a6b3f36f12751f17898f9.png

The Apache2 error log is not reporting anything.

What else is there left to do?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...