Forum OpenACS Q&A: Problems with Images

Collapse
Posted by Babji Lakkakula on
I am having problems with images i kept in www/ folder.. thery are
not visible to browser... even the images in www/graphics folders...
is it the problem with my local machine?

redhat linux 6.2 + openacs apache rpm on Dell optiplex machine

Collapse
Posted by Babji Lakkakula on
I set 1 for graphicsiteavailableP in ad.ini and restarted the server..still have problem...
Collapse
Posted by Robert Ezman on
Make sure you have the right permissions on the direcory and on the images....

If you web server is running under user "username"

(you should be root to do the following)

chown username:username <file or directory>

obviously replace <file or directory> with the actual file or directory name...

If that doesn't do it then try the following

( you should be the user that the web server is running under
  when you do the following...root is ok too)

chmod +r <file or directory>

or

chmod 700 <file or directory>

Basically the web server needs access to files before it can serve them.

Collapse
Posted by Ola Hansson on
Hi Babji,

I would guess that there's a problem with the file permissions on your images. Cd to your image dir and issue for instance:

chmod -R 755 . (including the dot)

Hope this helps.

Collapse
Posted by Babji Lakkakula on
Thanks...but the problem is not with the permissions.. I just checked the access.log and found,

GET /static/buttons/academics_over.jpg HTTP/1.1" 200 2602

it means (error code 200 ) the file is corrupted. right?
I did ftp to the home folder as a user and then moved to www folder as root...
what next? do I need to load the files on server machine it self instead of ftp.. please let me know...

Collapse
Posted by Robert Ezman on
I'm still not convinced that it's not a permissions problem.

Go to the files/directories in question an do an ls -al

If you moved the files as root then the file may now be owned by root.  In which case you have to fix the ownership or make the files readable by all, including the user that the server is running under.

Ftp is a guaranteed protocol...if the upload finished sucessfully then the files should have arrived intact.  Unless of course you uploaded your images in text mode....you did set ftp to binary mode didn't you?

One more suggestion....If I'm ever in doubt about the file integrity when transfering files I zip them up and then on the other side I do a test with the zip program (it has some crc functionality).  If the zip file is corrupted on the other side then you've got a problem.

Collapse
Posted by Roberto Mello on
Actually, return code 200 in the HTTP protocol is the "OK" return code. See RFC 2068 for all the return codes (http://info.broker.isi.edu/in-notes/rfc/files/rfc2068.txt).
Collapse
Posted by Babji Lakkakula on
right..I noticed that later..(I am confused with http://www.arsdigita.com/bboard/q-and-a-fetch-msg?msg_id=0006fg&topic_id=21&topic=web%2fdb posting by Rob Mayoff at arsdigita..on error code 200...) anyhow, i checked the permissions and all are with root...but I am using openacs-apache rpm..so i am running apache server as root..in that case it should work, right?
Collapse
Posted by Krzysztof Kowalczyk on
The log (200 code) says that browser has asked for the picture and it has been succesfully delievered. What is the evidence that those images are not visible in the browser? You see nothing at all or those "missing image" icons that browsers usually show for missing images.

How do you know they are visible at all? Did you have them working in some other configuration?

Did you do "show source" in your browser to see how the HTML page does look like? It can be a problem with the HTML code.

Can you post an url to your site (if it's accessible) that shows this problem?

Collapse
Posted by Babji Lakkakula on
I can see missing image icons... (incase of /graphics/up.gif too those are with nsadmin permisisons)... the images are working fine even I back ftp to a pc from the server...another thing I noticed is when i gave image src to another site that image is showed up fine... one url is http://cashew.bae.lsu.edu:8000/static/generalinfo/generalinfo.htm

rao

Collapse
Posted by Krzysztof Kowalczyk on
I used wget to get the image directly:
[kjk@rusty acs]$ wget http://cashew.bae.lsu.edu:8000/static/buttons/homebutton_over.gif
--21:49:12--  http://cashew.bae.lsu.edu:8000/static/buttons/homebutton_over.gif
           => `homebutton_over.gif.1'
Connecting to cashew.bae.lsu.edu:8000... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [image/gif]

    0K ->

21:49:12 (768.55 KB/s) - `homebutton_over.gif.1' saved [787]
As a response I get 787 byte file with a good content type (image/gif) but the file is corrupted. I'm not an expert on gfx formats but it starts ok (with "GIF89 header"):
[kjk@rusty acs]$ hexdump -c homebutton_over.gif 
0000000   G   I   F   8   9   a   z   Ã? 200 033   Ã? 200   Ãf 204   Ã? 200
0000010   Ã? 200   f   3   Ã, 231   Ã,   ¢   x   Ãf 210   Ã, 215   Z   Ã,   ¼
0000020   Ãf   ¢   Ãf 226   Ãf   ®   Ã,   ¿   Ã,   ¢   Ãf 231   Ãf   ¸   Ãf   µ
but neither ee nor gimp can load it. So it's corrupted. I see two possibilities:
  • it's not send correctly by AOLserver. Go to your server and see if homebutton_over.gif is 787 bytes in length.
  • it's broken on your machine
To test the second possibility: on your machine try to use gimp or ee or any other gfx program to manipulate it.

If you uploaded the image to your server with ftp make sure that you use 'bin' (not 'ascii') mode of transfer.

Basically compare the gif on your Linux machine with a source gif that you're sure is correct.

Collapse
Posted by Brian Mann on
I had the same problem when I set up OpenACS with the Apache rpm set...I never did get them to work. I went to using Apache as a proxy to two seperate aolserver setups on different ports...

Brian

Collapse
Posted by Babji Lakkakula on
SOrry for lost contact (busy with homeworks!)... I checked the images on linux server and they are looking ok...ee is opening them perfectly..file sizes and permisions (755) are also correct... even when I open the local htm file in netscape, its working..so some thing is wrong with apache/mod aol server ...
Krzysztof, thanks for your help... actually the file size is 522bytes....i dont know how it came as 787 b for you...
brian's comments scared me...
Collapse
Posted by Os Tyler on
Hello Babji,

The problem you describe here sounds similar to the problem I have seen.

You may want to try the workaround described here and see if it helps.

https://openacs.org/forums/message-view?message_id=18499

Collapse
Posted by venkateswarlu lakkakula on
hello brother
how are u ? i hope u are fine
u r surname and my surname matches
my name is venkateswarlu lakkakula

please send your details
to these email address:

mailto:venkateswarlu.lakkakula@gmail.com
mailto:venkat_mca2005@yahoo.com
please brother
thanking u
your brother
venkateswarlu