Forum
Gallery images upload problem
Hi there
My client is having an issue uploading images to a gallery. Everything seems fine selecting and (seemingly) uploading the image, but when it finishes and the gallery refreshes, the image isn't in the gallery. I had a look on the server to see if the file had actually uploaded, but it has a file with a filename of '-1' (no extension) and the file size is 0 bytes. Adding more, just creates '-2', '-3' and so on.
Everything was fine on our staging server, but moving it to their server has brought out this behaviour. I'm certain it's a server configuration issue as they are hosting it on IIS. When we run it on Apache, it's fine.
I know it's a setup issue, but has anyone had this before? We've already had to tweak loads to get round IIS and it's funnies, but this one has us stumped. All the normal checks are ok (GD installed, resource dir writeable, latest version running etc..)
Oh, if I upload the same file through Assets, it's perfectly ok. It's just in the gallery app where the issue is.
Thanks in advance.
Please post your Diagnostics Report, and the template which you are using when you have a problem.
Hi Rachel
This is the diagnostics report:
And here is the template for the gallery image:
Thank you.
How big is your image? It looks like your max size is 2MB.
Hi Drew
Yes, I noticed that too. I tried it with an image of 29kb but to no avail. The same image uploaded fine through Assets though.
What type of image is it? What does the file name of the image look like?
I tried 2 normal jpg files. They both opened ok in other programs and the filenames were produce-lamb.jpg and produce-beef.jpg.
Is there anything in your server error log?
I've just sent the client a request for the log file as I can't access that. Hopefully there will be something in there. I'll come back when I have it..
Hi Drew
Sorry for the delay, but I finally have the log file. There are many repeated errors (tried it multiple times) so here is a snippet of just one occurence.
As I said before, all image uploads are perfectly ok through Assets.
Thanks very much..
It sounds like the image is being uploaded but then can't be read. Do you have control over the file permissions?
That's what I thought at first, but the image is on 0 bytes. Not sure if that means it made it or not.
I don't have direct access but the client is a software house so they are very good with these sorts of issues but unfortunately they don't do php or mysql. I do have full FTP access though.
What also puzzles me is that going through the Assets app, it works fine. I guess that means the gallery app handles certain bits differently as well as permissions (?)...if that is the cause of course..
If the image has zero bytes then it wasn't uploaded - it's an empty file.
Has this problem been solved as I have the same issue?
Hi Andy
Gosh, old thread this one!
Drew was spot on about permissions. The problem was the client insisted on hosting on a Windows server under IIS and it caused all sorts of issues. I'm not saying Windows Server and IIS are bad, but I don't know much about setting them up properly so they had to get someone in the know to sort it out.
Although it was a permissions issues, all I was told is that it wasn't a 'straight forward permissions issue'. The right users need the right permissions to all sorts of stuff.
Hi Michael,
Thanks for the prompt reply. I'm using Apache on CentOS so I'll have to try tweaking the permissions. The issue occurs on both my local VM and the remote server.
Ah I see.
I would advise you start a new thread with the problem so Drew and Rachel can handle it as a separate issue. Don't forget, this has been marked as resolved so they may not even see it.
Hope you get it sorted.