File manager, image thumbnails not working, error, solution 😁

Permalink 2 users found helpful
I'd really appreciate any help, I'm totally stuck :-/

When I try to upload an image with a large pixel width or height, it uploads but doesn’t create most of the thumbnails. The file size was 457KB.

I tried making the image really low quality and smaller file size (225KB) to see if that would help, it just made matters worse, now I get a 500 error when I try to upload the image.
The image does actually upload though and if I go to view the image in the File Manager I can see it and edit it but doesn’t create any thumbnails. There are no details in the properties section and there is a message that says “Invalid file dimensions, please rescan this file.”
If I try to rescan I just get an empty error message. The image is also not available to use via blocks.

This seems to work alright on my local computer so I assumed it was a memory issue.
I created a php.ini file and set the following values:

memory_limit = 512M
post_max_size = 256M
upload_max_filesize = 256M

I checked via a phpinfo page and the environment in C5 and the new values are showing up. (Environment info below) It doesn’t seem to help though.
Are there any other settings that I need to change?


I'm trying to test this out so I'm using a new install of C5 with no plugins or anything and default theme. I've got the three images in the File manager.

ishan-seefromthesky-1113280-unsplash.jpg
Was uploaded while on my local machine, pixel size is 3000 x 4000 and 2160KB
Worked fine and all thumbnails are all made

blake-richard-verdoorn-20063-unsplash.jpg
Was uploaded while on the live server, pixel size 1900 x 2850 and 457KB
Uploaded without error but only made 3 of the thumbnails, when I hit rescan it just makes one more and won't make any others.

aaron-burden-363695-unsplash.jpg
Was uploaded while on the live server, pixel size 3333 x 2500 and 255KB
Got a 500 error when uploading, file did upload but didn't make any of the thumbnails, when I hit the rescan button I get a blank error message

All three images upload and create all thumbnails properly on my local machine



# concrete5 Version
Core Version - 8.4.3
Version Installed - 8.4.3
Database Version - 20180716000000

# concrete5 Packages
None

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.34 (Unix)

# Server API
cgi-fcgi

# PHP Version
7.2.10

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 512M
post_max_size - 256M
upload_max_filesize - 256M
ldap.max_links - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

3 Attachments

rosie607
View Replies: View Best Answer
rosie607 replied on at Permalink Best Answer Reply
rosie607
Maybe I'm the only person who didn't know you needed to do this but I think I've got this working and thought the solution might be useful for someone else.

Even though I'd added the php.ini file with the new memory_limit and it was showing up in the phpinfo it didn't seem to have any effect.

I add the following to the htaccess file and it's working! I'm so happy :-D

RLimitMEM MAX
somesayinice replied on at Permalink Reply
I ran into the same problem on my local server and on my the live server until ... I switched the image processor to imagick. It was installed on my live server by my hosting service but not installed on my local server.
Here is the code to activate it in concrete.
Navigate to application/config/concrete.php or create the file in application/config if it is not present.
Copy the following code into that file.
<?php
return array(
    //    'email' => array(
    //        'form_block' => array(
    //            'address' => '[email protected]',
    //            'name' => 'Yourname'
    //        )
    //    ), 
    'file_manager' => array(
        'images' => array(
            'manipulation_library' => 'imagick',
        ),
    ),   
);


If Imagick not installed on hosting service then I would call them to ask them to install it for you.

If imagick not installed on local server, install by following these instructions:https://ourcodeworld.com/articles/read/349/how-to-install-and-enable...

Use the following link to find the proper imagick php and apache combo depending on your php version:https://mlocati.github.io/articles/php-windows-imagick.html...