Westfield Sports Car Club Posted November 8, 2021 Posted November 8, 2021 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 and if I try to upload a JPEG of 5000x3335, it resizes it just fine to the maximum (ratio) size and shows the preview If I try a PNG of similar (4816 × 4784) size, it fails I then tries resizing the PNG to smaller size and it fails at 3000x2000, but at 1500x1000 it works?!? 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?
Jim M Posted November 8, 2021 Posted November 8, 2021 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.
Westfield Sports Car Club Posted November 8, 2021 Author Posted November 8, 2021 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.
Jim M Posted November 8, 2021 Posted November 8, 2021 GD is extremely resource hungry when resizing images and PNGs are rather large images. I would check your server error logs to see if you are running out of resources and for some reason it is simply not making it back as a "-200" error.
Westfield Sports Car Club Posted November 8, 2021 Author Posted November 8, 2021 Ok, I will see what the server logs are saying For what it is worth, I've also tried uploading the large PNG file to this thread, and although it takes a long time (relatively) to complete the upload, it does complete and shows the preview
opentype Posted November 8, 2021 Posted November 8, 2021 2 hours ago, Westfield Sports Car Club said: larger (dimensions, not filesize) That’s a very typical sign of problems with the server processing limits. Jim M 1
Westfield Sports Car Club Posted November 8, 2021 Author Posted November 8, 2021 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.
Jim M Posted November 8, 2021 Posted November 8, 2021 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.
Westfield Sports Car Club Posted November 8, 2021 Author Posted November 8, 2021 Set the image size to 5000 x 5000 and retried the file, but same result. I'm the server administrator.
Jim M Posted November 8, 2021 Posted November 8, 2021 14 minutes ago, Westfield Sports Car Club said: Set the image size to 5000 x 5000 and retried the file, but same result. I'm the server administrator. You'll want to set "Maximum image dimension to save" to Unlimited. Westfield Sports Car Club 1
Westfield Sports Car Club Posted November 8, 2021 Author Posted November 8, 2021 Ok, that did make a difference. With it set to 5000x5000 which although is larger than the image size it still behaved the same. But set to unlimited, it uploaded the 4816×4784 PNG without errors. So where to go now?
Marc Posted November 9, 2021 Posted November 9, 2021 You would need to contact your hosting company. First of all I would increase memory_limit on your server and try that though. What is happening here, is when the gd library is involved (any time you have limits set) its failing. Its only not failing when your server isnt involved in any resizing
IveLeft... Posted November 9, 2021 Posted November 9, 2021 Have you tried using ImageMagick instead of GD ? Marc 1
Westfield Sports Car Club Posted November 9, 2021 Author Posted November 9, 2021 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.
Marc Posted November 9, 2021 Posted November 9, 2021 Unfortunately running on an old server environment using the latest technology in software will indeed cause you issues at some point down the line
IveLeft... Posted November 9, 2021 Posted November 9, 2021 @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.... Marc 1
Westfield Sports Car Club Posted January 28, 2022 Author Posted January 28, 2022 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 The Apache2 error log is not reporting anything. What else is there left to do?
Marc Posted January 28, 2022 Posted January 28, 2022 This is because the software does not yet support PHP 8.1. At present 8.0 would be the highest
Westfield Sports Car Club Posted January 28, 2022 Author Posted January 28, 2022 I activated PHP8.0 through virtualmin, but unfortunately the same error message in the System Log.
Marc Posted January 28, 2022 Posted January 28, 2022 That error message indicates an issue in your file storage configuration. Have you checked any constants.php file you may have?
Westfield Sports Car Club Posted January 28, 2022 Author Posted January 28, 2022 There's only one constants.php in ~/public_html/forum and it contains <?php define( 'CP_DIRECTORY', 'admin-acw-dec' ); and nothing else.
Jim M Posted January 28, 2022 Posted January 28, 2022 All file storage configurations that are in use in ACP -> System -> Files -> Storage Settings -> Configurations have valid paths?
Westfield Sports Car Club Posted January 28, 2022 Author Posted January 28, 2022 Nothing untoward there as far as I can tell.
Jim M Posted January 28, 2022 Posted January 28, 2022 Please be advised I have marked this to a developer for further review here to see if there is anything further that they would recommend validating on your server. Westfield Sports Car Club 1
Management Matt Posted January 31, 2022 Management Posted January 31, 2022 Hi, I've moved this to a ticket, one of our developers will claim it shortly. Westfield Sports Car Club 1
Recommended Posts