Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello,,
I have a problem with apache,,
when i tried to open an image (.png) throw the apache on firefox Like this:
(http://localhost/......../framework/images/keyboard.png)
it opened corrupted like this:
( PNG IHDR 9 PLTE>8PIDATx^Mʱ 7lp{Xhgr,fF`¸w|y՟ņkHNۣyé[c(އ6zIENDB`)
but on "Internet Explorer" it's opened correctly
what is the probloem ,, is there something must added to httpd.conf !!!
Note: I tried to add this line (AddType image/png png) inside the httpd.conf but Without avail
Can you not open any .png image or any specific?
because if you are facing this problem for any specific image, open it in GIMP and save again it as .png.
Now try to open it in localhost.
hi pavi_kanetkar ,,
I can't open any .png photo from my project inside the "FIREFOX" , but it's opened inside "IE"
BTW ,, there is no problem with other extensions like jpeg, gif ...
When you inspect the element in firebug, what does it say?
Does it say image not loaded?
Are they background images and you are trying something like this?
Code:
background:url(img/runner1.png) no-repeat;
If these png's are created in photoshop, they might not be opened in chrome and firefox.
Download any png image from google and try with it. Are you facing the same problem?
more details about my problem ..
when I put the image inside the ( htdocs dir ) inside the apache the (.jpeg, .png and any extension) opened very good inside firefox and IE ,,
but
when I put the Image in another dir (inside my weblogic) and insert this lines:
<Location /somthing>
SetHandler weblogic-handler
</Location>
inside httpd.conf ,, and tried to open .png it views like this (Š4ŠE€ Ej„"@†"5B €FC‘@HP PF(h(R#h4Š4ŠE€ Ej„"@†"5B) inside firefox but it opened correctly inside IE
about "pavi_kanetkar" question (When you inspect the element in firebug, what does it say?)
Error: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol.
Source File: http://localhost/..../images/IMAGE.png
As you said the attribute is already off. The message you are getting i.e. "Error: The character encoding of the HTML document was not declared." is generally appeared when the image is corrupt. You will say it is opened fine in IE but for firefox conditions are little different.
As I said before check for different png images.
Have you defined
http-equiv="Content-type" content="text/html; in your project?
The problem is that Firefox rely on type send in headers, but IE rely on file extension, as you have problems with any png image, then it is most probably problem with sending correct headers. You can install "Tamper data" extension in Firefox to see headers, check what "Content-Type" is sended.
Did you restarted Apache after adding "AddType image/png png"?
really i don't know where can I define "http-equiv..."
coz I call the Image directly from browser "http://localhost/..../images/IMAGE.png" not via a link from page.
BTW ,, I guess there is something wrong between the weblogic and apache because also inside the FIREFOX when I try calling the Image with weblogic port (like this "http://localhost:7001/..../images/IMAGE.png") it works very good ,, and when I copy this Image to "htdocs" inside the apache and call it (like this http://localhost/IMAGE.png") it works very good.
but
when I call the Image (like this "http://localhost/..../images/IMAGE.png") it doesn't work ,,
and when I call another extension (like this "http://localhost/..../images/IMAGE.jpg") it works very good.
I can't explain my problem very well but I hope you understand me
Yes, I have understood your problem. You can't open png images in firefox if they are inside any project folder in htdocs. If they are put in htdocs outside project folder, you can open them in firefox.
As you have said, your project folder is in htdocs, it means are your using lampp?
Please follow the suggestion once given by 'eSelix' in above comment.
Add following line in your apache conf file and restart apache.
AddType image/png png
this is the first thing I done as I said in the first comment "Note: I tried to add this line (AddType image/png png) inside the httpd.conf but Without avail "
Sorry, I missed the line.
When I found this problem on my apache, I have done the things what I suggested you above and it was solved at my end but they are not working for you.
Can you try <a href anchor tag.
Open a blank file and paste following line in it and save it as png.htm
when I use <img... the Image viewed correctly
but when I use <a href.... and click on the link I have (Š4ŠE€ Ej„"@†"5B €FC‘@HP PF(h(R#h4Š4ŠE€ Ej„"@†"5B)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.