Image Upload Error
Permalink
I have just installed 5.7.5.2 on my server and when I try to upload any image files either through the individual or through add incoming I get an error message but the error is blank. Their is nothing in the logs.
I have no idea what to do at this point. I have tried to upload a file as small as 2.5MB and it does the exact same thing. I saw some errors about the Importer.php that said to modify the file because there is a bug in this version. However I am unable to find the article again.
Any thoughts?
I have no idea what to do at this point. I have tried to upload a file as small as 2.5MB and it does the exact same thing. I saw some errors about the Importer.php that said to modify the file because there is a bug in this version. However I am unable to find the article again.
Any thoughts?
Hi AndyJ:
Thanks for the reply. Environment settings below. I have tried many files and many small files. Small files less than 1MB seem to work ok. Anything over is a problem.
# concrete5 Version
Core Version - 5.7.5.2
Version Installed - 5.7.5.2
Database Version - 20150731000000
# concrete5 Packages
Long Story Short (1.1.1).
# concrete5 Overrides
languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE
# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache
# Server API
cgi-fcgi
# PHP Version
5.3.3
# PHP Extensions
bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, readline, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.
# PHP Settings
max_execution_time - 60
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
Thanks for the reply. Environment settings below. I have tried many files and many small files. Small files less than 1MB seem to work ok. Anything over is a problem.
# concrete5 Version
Core Version - 5.7.5.2
Version Installed - 5.7.5.2
Database Version - 20150731000000
# concrete5 Packages
Long Story Short (1.1.1).
# concrete5 Overrides
languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE
# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache
# Server API
cgi-fcgi
# PHP Version
5.3.3
# PHP Extensions
bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mysql, mysqli, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, readline, Reflection, session, shmop, SimpleXML, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, zlib.
# PHP Settings
max_execution_time - 60
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
No additional error information is displayed if I turn on the variable to display everything.
are you able to keep uploading files of less than 1 meg (1 after the other) or does it stop you from uploading after 1 or 2 files?
It works just fine. It seems just the file size itself is the problem. I found the link I saw earlier:
http://www.concrete5.org/community/forums/5-7-discussion/file-size-...
I have attempted the first fix, didn't work. Trying to move on to the other ones.
http://www.concrete5.org/community/forums/5-7-discussion/file-size-...
I have attempted the first fix, didn't work. Trying to move on to the other ones.
give it a go!
Strange you aren't getting any errors at all - that would really help.
Strange you aren't getting any errors at all - that would really help.
while you're doing all of this it might be worth logging a quick call with your host to explain the issue as well just in case.
Update: Still getting the same thing. I really believe this is a bug in Concrete. In Plesk I can see the following errors now:
2015-11-08 15:56:28 ERROR POST /index.php/tools/required/files/importers/incoming HTTP/1.0
2015-11-08 15:56:29 WARNING mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5184 bytes) in /var/www/vhosts/domain.ca/httpdocs/concrete/vendor/imagine/imagine/lib/Imagine/Gd/Image.php on line 602, referer:http://domain.ca/index.php/dashboard/files/search...
2015-11-08 15:56:28 ERROR POST /index.php/tools/required/files/importers/incoming HTTP/1.0
2015-11-08 15:56:29 WARNING mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5184 bytes) in /var/www/vhosts/domain.ca/httpdocs/concrete/vendor/imagine/imagine/lib/Imagine/Gd/Image.php on line 602, referer:http://domain.ca/index.php/dashboard/files/search...
Hi.
the error is saying that php is running out of memory. It looks like you are just on the limits.
In order for the file uploader to run you are going to have to try to allocate it some more memory to use.
Looking at the error I'd guess you probably need to add something like the following to the index.php in the root of your website
ini_set('memory_limit','160M');
This needs to go directly before the call for the dispatcher - so your index.php would look like:
<?php
ini_set('memory_limit','160M');
require('concrete/dispatcher.php');
If you change it incorrectly though - your site will stop working so if you are in any doubt then don't do it. Take a copy of the file and download it locally first so you can upload the original if there are issues.
the error is saying that php is running out of memory. It looks like you are just on the limits.
In order for the file uploader to run you are going to have to try to allocate it some more memory to use.
Looking at the error I'd guess you probably need to add something like the following to the index.php in the root of your website
ini_set('memory_limit','160M');
This needs to go directly before the call for the dispatcher - so your index.php would look like:
<?php
ini_set('memory_limit','160M');
require('concrete/dispatcher.php');
If you change it incorrectly though - your site will stop working so if you are in any doubt then don't do it. Take a copy of the file and download it locally first so you can upload the original if there are issues.
HI,
I just took a look at the original message - is there a reason you are uploading such large image files?
Not saying you shouldn't be able to but it looks as though that is what is taxing your server.
I just took a look at the original message - is there a reason you are uploading such large image files?
Not saying you shouldn't be able to but it looks as though that is what is taxing your server.
Hi AndyJ,
Unfortunately even when I upload one file at 2.5MB I am still getting the error message. Even when I modify the index.php file to reflect as shown. When I first started dealing with the error I was uploading many files at a time which could have been the reason for the error. This is no longer the case. I am only testing with one 2.5MB file.
Unfortunately even when I upload one file at 2.5MB I am still getting the error message. Even when I modify the index.php file to reflect as shown. When I first started dealing with the error I was uploading many files at a time which could have been the reason for the error. This is no longer the case. I am only testing with one 2.5MB file.
@ryanr
I agree with AndyJ, I believe your images are too large and the server memory is set too low.
When uploading images to concrete5, thumbnails are created for the file manager and responsive images. To create the thumbnails, the images have to be processed. Processing a 2.5MB image will require substantial memory.
"I have tried to upload a file as small as 2.5MB and it does the exact same thing."
What happens when you upload a smaller file, something 500KB or smaller?
In general, it is recommended to compress your images before using them on the web.
I agree with AndyJ, I believe your images are too large and the server memory is set too low.
When uploading images to concrete5, thumbnails are created for the file manager and responsive images. To create the thumbnails, the images have to be processed. Processing a 2.5MB image will require substantial memory.
"I have tried to upload a file as small as 2.5MB and it does the exact same thing."
What happens when you upload a smaller file, something 500KB or smaller?
In general, it is recommended to compress your images before using them on the web.
Hi @MrKDilkington,
Thanks for the reply. I guess now there are two people telling me the same thing. I know if I just reduce my file sizes that the issue will go away if I go below 1MB. Can you have a look at this post though (http://www.concrete5.org/developers/bugs/5-7-5-2/image-uploads-timing-out-or-throwing-other-errors/). This is the reason I was pushing in this direction.
Thanks for the reply. I guess now there are two people telling me the same thing. I know if I just reduce my file sizes that the issue will go away if I go below 1MB. Can you have a look at this post though (http://www.concrete5.org/developers/bugs/5-7-5-2/image-uploads-timing-out-or-throwing-other-errors/). This is the reason I was pushing in this direction.
@ryanr
I don't think the issue you linked to is what you are experiencing.
That issue is - "PHP Fatal error: Maximum execution time of 30 seconds exceeded in".
Your issue is - "PHP Fatal error: Allowed memory size of..."
A 1MB image file that has been optimized will be very large. Unless you have special requirements, I don't see the need to use larger files. If you do need to use larger files, you will need more server memory.
Your current memory limit is 128MB. When you process large files you are exceeding that.
I don't think the issue you linked to is what you are experiencing.
That issue is - "PHP Fatal error: Maximum execution time of 30 seconds exceeded in".
Your issue is - "PHP Fatal error: Allowed memory size of..."
A 1MB image file that has been optimized will be very large. Unless you have special requirements, I don't see the need to use larger files. If you do need to use larger files, you will need more server memory.
Your current memory limit is 128MB. When you process large files you are exceeding that.
if you look at your environment information in the dashboard what does it show under php
for:
upload_max_filesize
post_max_size
?
Does it show anything on the screen if you change your debug settings to:
Output error information to site users
Show the debug error output
?