Image upload problems in file manager

Permalink
Hi everyone,

I'm trying to debug an image upload issue that my client is having. Unfortunately I can't replicate the issue so it's making this rather difficult.

The client needs to update images via the file manager. He says that he uploads the image (either one at a time or via upload multiple) and they aren't always 'sticking'. The image appears in the file manager list with a broken image icon next to it instead of a thumbnail. If he repeats the upload process maybe 5 times, it may finally work.

- I have confirmed that he is uploading normal sized images, and they aren't weird formats. The image is not the problem.
- If I upload the same images it works fine for me every time.
- He has tried doing this using several browsers - same problem
- I tried uploading using his C5 login, works fine for me
- If you click the image and try to rescan the thumb, it says the file does not exist.

I'm struggling to think what the problem might be. It's made more difficult by the fact I can't replicate the problem, and he won't be all that keen to let me remote control his PC for testing purposes (although if we have to do that then so be it).

I'm just wondering if anyone else has had this kind of issue before and what else I should be checking.

The site is quite new and is 5.6.1

Thanks.

Sadu
View Replies:
Adreco replied on at Permalink Reply
Adreco
Could his internet connection be slow enough that the uploads are timing out?
Sadu replied on at Permalink Reply
Sadu
It would be unlikely, but I'm not ruling anything out. thanks for the reply.

They are a corporate customer and I'd expect their internet is good. There is the possibility it's a firewall or other network device getting in the way, though this is hard to confirm. I'm yet to get the client to test from his home connection, though this is on my list.
drbiskit replied on at Permalink Reply
drbiskit
When your client has uploaded something and 'The image appears in the file manager list with a broken image icon next to it instead of a thumbnail' - are you able to download or view anything at all, and are there any properties stored against the upload at all?
Sadu replied on at Permalink Reply
Sadu
Yes, there are properties stored against the image record - who uploaded it, width and height, and the location of the file (where it's supposed to be but isn't).

The actual file isn't on the server in the files folder like it should be, and rescanning doesn't work. However all is well if I upload the image myself.
MoonGrab replied on at Permalink Reply
MoonGrab
Could you give us a few more details on the server specs?
I'm curious whether it uses nginx as a reverse proxy. Its average load could be the issue as well.

I had the same problem but solved it, mine was a server issue.

phpinfo(); output might also be helpful.
Sadu replied on at Permalink Reply
Sadu
Thanks for the comments everyone.

Here's the environment info from Concrete5...

# concrete5 Version
5.6.1

# Server Software
Apache

# Server API
apache2handler

# PHP Version
5.3.3

# PHP Extensions
apache2handler, apc, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, memcache, mysql, mysqli, odbc, openssl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, recode, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib.

# PHP Settings
max_execution_time - 3600
apc.max_file_size - 1M
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 512M
post_max_size - 200M
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 - 100M
ldap.max_links - Unlimited
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
Sadu replied on at Permalink Reply
Sadu
Also the site is load balanced across several servers.

However all the admin work is done on one server and then the replication happens independently.
cherrycake replied on at Permalink Reply
cherrycake
if there is a load balancing involved, perhaps it's a DNS issue where their local DNS record is pointing to a replicated server whereas when trying to upload the files from a remote source it accurately points to the right server?

far fetched but if he is having problems but not you, the typical reason would be either a firewall, dns or browser issue.
cherrycake replied on at Permalink Reply
cherrycake
my guess is it has something to do with a max setting for the memory_limit in php and the image processing (GD library) exceeding this limit. if you try with a small image and it works everytime this is probably it. the reason for why it may work after trying a few times may be because of caching and for each try less memory might be needed for the processing of the image.
Sadu replied on at Permalink Reply
Sadu
Thanks, but we seem to be having problems with small 160x100 sized images as well as large ones.
Pluto replied on at Permalink Reply
Pluto
Hello Sadu
Have you solved this problem. I am suffering the same problem. Whenever i am uloading image it is not showing me the success message even if the image file is too small. But when i am uploading other files like word it is working fine.
Please help.
Thanks @pluto
ntisithoj replied on at Permalink Reply 3 Attachments
ntisithoj
I am having the same problem with 5.7.4R2

php memory is set to 128M
application/files perms are set to 777

I can successfully upload an image, in that after uploading it I can use it, but the thumbnail is always a yellow flower (which I assume beans 'broken'). When I rescan that image I get the error message of simply "Error" with a blank box (see attached)

Nothing in the error logs
I have debug turned on in Concrete
gd successfully installed (see attached)
running on Debian, apache2

Any clues as to where I might find the error. Or maybe someone has fixed this same problem?

What is additionally weird is this just started as you can see by the attachment, all my old images have thumbs. And I can rescan those no problem. Have tried with various images, all generally small. This MAY have started when I updated to 5.7.4R2

This same error happens on two different machines, one running debian and the other running arch.
goodnightfirefly replied on at Permalink Reply
goodnightfirefly
You might have encountered this issue:https://github.com/concrete5/concrete5/issues/2341...

Update to the latest 5.7.4.1 and see if your problem is fixed.
ntisithoj replied on at Permalink Reply
ntisithoj
nice. thanks.

I resolved the problem by uninstalling php-imagick from my system... then it defaulted to gd, and worked. So, not really a 'fix', but functional.

p.s. same problem with 5.7.4.1