Hey there, I'm new here and I've successfully installed elgg on my Ubuntu server. I am unable to see images in elgg. I upload them, and I don't end up seeing the image or thumbnail. I have been able to successfully upload txt files, so the upload seems to work. There appears to be something weird with images though. If anyone can help, I'd appreciate it.
Thanks
Patrick
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
@Dhrup
synaps-acc is the testing server given to me by the ICT department and they blocked internet access in the firewalls, so you can't see it over the internet only intranet.
version is: 1.7.1. 2010040201
When checking my data folder it does create the necessary image files and I can download them and open them properly. In creates the files 110.jp, 110large.jpg, 110medium.jpg, 110small.jpg, 110tiny.jpg. File sizes are 220kB, 14kB, 6 kB, 1.7kB and 1.1kB respectivly.
Files are all .jpg. The files don't appear to be corrupted during upload as I can download the files and open them from my data folder. However since the capthca plugin is also not creating an image it still appears to be something on the server side. But how can that be as GD is enabled and is obviously doing something as it does create the thumbnails?
The error-log shows no errors and the access-logs show these entries:
145.117.35.27 - - [05/Oct/2010:14:23:48 +0200] "GET /pg/groupicon/110/tiny/1286281427.jpg HTTP/1.1" 200 995 "http://synaps-acc/pg/groups/110/virions/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E)"
145.117.35.27 - - [05/Oct/2010:14:23:48 +0200] "GET /pg/groupicon/110/large/1286281427.jpg HTTP/1.1" 200 13920 "http://synaps-acc/pg/groups/110/virions/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E)"
Access rights to my data folder are set as: drwxrwx---.
Any ideas?
Matthijs
The images should be displayed using code similar to this -->
header("Content-type: image/jpeg");
header('Expires: ' . date('r',time() + 864000));
header("Pragma: public");
header("Cache-Control: public");
header("Content-Length: " . strlen($contents));
echo $contents;
some php code - that is supposed to display the image -
might be corrupted or bad..
The error message
“...cannot be displayed, because it contains errors”
could be possibly fixed by -->
-- try to delete any space character between the
beginning of the script and the php tag <?php
and also look for any extra characters after the ?>
at the end of the script
This happens because any extraneous characters being output
will alter / corrupt the image format.
I found this mentioned in some forum somewhere...
I looked at it, but I'm not thinking of a coding problem at the moment. When I transfer the code to a different testserver the problem is gone. So it's due to something at the server side. I'm going to try and figure out what it is, but at least GD is enabled and data directory access permissions are set to 777.
I'd love to be able to connect to your synaps-acc to see ;-)
Hmmmm.. curiouser and curiouser... different server - no problems ?
then must be that intranet server -->
What OS, apache ?
If the problem persists with that synaps server =>
server is (must be) dispatching the (larger) images "incorrectly" ?
so there may be some parms in htaccess.. maybe.
Yep, it's a Linux server with Apache 2.2.3 (Red Hat).
In the access log it is requesting the group icons (but of course aren't being displayed):
145.117.35.27 - - [06/Oct/2010:16:59:50 +0200] "GET /pg/groupicon/109/small/1286377181.jpg HTTP/1.1" 200 521 "http://synaps-acc/pg/profile/mrwelkers" "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E)"
I checked the .htaccess and there are no real image related sections in there. I also copied the htaccess file from the installation where it works but no joy.
synaps-acc may have a higher level htaccess or some other http.conf parameters that could be playing / overriding the Elgg htaccess / phi.ini parms. when you do a php_info() - you should see some of the limits, etc in 2 columns -->
Directive Local Value Master Value
memory_limit 128M 64M
here in this example - even though the local value is 128,
cannot override the master value of 64.
this one is "killing" me bevause I cannot look inside your server ;-)
Sorry Dhrup, the ICT department won't let me expose the server to the outside world. They are also now looking into it like a bunch of pitbull-terriers and they found that an additional carriage return is added to the name of the file which corrupts it for the browser. So it doesn't appear to be an Elgg issue but a server issue somewhere. They are now pinpointing where this is occuring because the .htaccess in the elgg directory is the default renamed htaccess_dist so nothing weird about that file, but after your post they are also going to check the higher level htaccess file. I'll let you know when we find more.
I also used smaller files (4kB) as input icon but that also doesn't fix the problem so the memory limit doesn't appear to be the issue. Also increasing my profile picture to a much larger picture (850 kB) doesn't break it, it displays nicely.
Ok, figured it out. It turned out my radius plugin contained an additional line. In html this isn't displayed but does add it to the file. Removed this line in the plugin and it worked. So I learned my lesson for next time. Turn off all non-core plugins and then try again...
Thanks for the help!
*You can only learn something when you realize that you don't know everything...*
aha ;-)
Seems to point to what i had quoted before "..extraneous characters being output
will alter / corrupt image" - except that we did not know then what we know now ;)
Interesting that uploading larger sized images did not break image output ;;
Can you post the before and after code from Radius ? kurious kat here, thnx.
Well, it didn't break because I was looking at the profile picture and the memory limit wasn't the issue so it did what it should. But the group pictures never worked, big or small. The guy from the ICT department grepped the start.php file and said he deleted the last space after the ?> mark which was still there. So it was exactly the problem as mentioned in the forum you quoted.
- Previous
- 1
- 2
- 3
- Next
You must log in to post replies.