LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-05-2012, 07:14 PM   #1
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Rep: Reputation: 1
Server corrupting images


Hi Guys...
I have a problem with displaying images.
My server is CentOS release 6.1 (Final)

If I a web page displays an image, it doesn't show.
If I click on 'show image' I get a message, something like 'image cannot be displayed because it contains errors'.

I have setup a page to demonstrate the problem:
http://art-burn.co.uk/index.htm
This has 2 pictures:
1. src from within the server.
2. src from an external server.

Using firefox, the 2 images are displayed, first as a small box (from local server), second normal (from external server)
Using IE, the 2 images are displayed, first as a corrupt picture (from local server), second normal (from external server)

I'm utterly confused with this, and cannot find any answers by Googling.

Can anybody suggest what may be wrong.

btw: the server did work fine originally, so it's something that I have done, but I don't know what.
 
Old 11-06-2012, 03:05 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Running Firefox 16.0.2 on both Windows and Ubuntu 10.04 the first one (from your local server) does not show. Loading http://art-burn.co.uk/images/HonkyTonk-18nov12-sm.jpg directly gives the error message that the file is corrupted.

Inspecting the image properties (with FF) on the page you provided shows that the files have different sizes and your local one shows as 0x0 pixels.

Opening in IE shows a text page with garbage and checking properties in IE shows that it's not a jpg.

Sounds like you've managed to corrupt the image in some way.

Last edited by Wim Sturkenboom; 11-06-2012 at 03:12 AM.
 
Old 11-06-2012, 03:56 AM   #3
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Yes, the server really seems to send gargabe as HTTP response for url http://art-burn.co.uk/images/HonkyTonk-18nov12-sm.jpg Can you inspect (and post) your apache configuration? Have you enabled some modules or changed something w.r.t. apache recently?
 
Old 11-06-2012, 04:49 AM   #4
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Hi Guys...
Many thanks for your input.
However, I still believe that the problem is with the server.
Quote:
Can you inspect (and post) your apache configuration?
I'm not sure what you mean by this. Do you mean my httpd.conf file ?
If you do, it's very large - size 38431
If you want to see it, it's here:
http://art-burn.co.uk/httpd.conf


Quote:
Have you enabled some modules or changed something w.r.t. apache recently?
No. Recently, I have been trying to find a suitable webmail program
I've tried: Mailview, Webmail Lite, RoundCube and squirrekmail.
I removed ALL the webmail programs and started again with squirrelmail.
This is when I noticed the image problem.
I could load the Squirrelmail image from an external server, but not locally.
This is when I started testing.
Here is another test that I have done this morning:
http://hughes-family-bakers.co.uk/test.htm
This site is located on the 'good' server.

I also installed postfix admin.
This didn't appeal to me when I had it installed, so I removed it.

Hope this info helps.

Thank you...
 
Old 11-06-2012, 05:24 AM   #5
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Your httpd.conf is also corrupted

Code:
 P—38¼®Å-
 E ~Oj@ @  XaÇ’)Vm" P²=CHy5j§€ m¶r  
%6\c€¶¿HTTP/1.1 200 OK
Date: Tue, 06 Nov 2012 11:14:08 GMT
Server: Apache/2.2.15 (CentOS)
Last-Modified: Mon, 05 Nov 2012 17:17:27 GMT
ETag: "8061d-961f-4cdc2a8dab73a"
Accept-Ranges: bytes
Content-Length: 38431
Connection: close
Content-Type: text/plain

#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
...
...
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       8
MinSpa P—38¼®Å-
 E Om@ @  XaÇ’)Vm" P²=CH‰j§€ m¶r  
%70c€·”s       256
MaxRequestsPerChild  4000
</IfModule>
And there are more like that.

I'm not sure where I would start looking.
 
Old 11-06-2012, 06:05 AM   #6
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Hi Wim Sturkenboom...
Thanks for your reply, and taking the trouble to help me.

The file is NOT corrupt.
I have now copied it to my 'good' server. You can view it here:
http://hughes-family-bakers.co.uk/httpd.conf

This is the same file, copied from
http://art-burn.co.uk/httpd.conf

It is obviously the 'faulty' server that is corrupting the files.

hth
 
Old 11-06-2012, 06:55 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I understand it's only the copy. It was showing that it's more than just images that are affected.

If possible, I would run a memtest for a night to check memory and badblocks to check your HD; manufacturer's testutilities for your HD are also an option.
 
Old 11-06-2012, 07:16 AM   #8
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Very weird indeed. I've worked with apache for 10+ years and I've never seen it corrupting files.
I would try a clean install of apache with clean config files and work my way to desired configuration.
 
Old 11-06-2012, 06:37 PM   #9
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Hi Guys...
Many thanks for your input.
Quote:
If possible, I would run a memtest for a night to check memory and badblocks to check your HD
I've run a memory test with memscope, running for 4 hours - no errors.
My experience is that running memscope will show up any memory problems within the first couple of passes.
I used Hirens to run a surface test on the hard drive, which showed no problems.
Quote:
I would try a clean install of apache with clean config files and work my way to desired configuration.
This certainly is an option, particulary as this is a test server.
However, I'm intrigued to know what I have done wrong - if anything.
I'll leave the thread running for a while to see if anybody has any suggestions.

Thanks for your help and advice,
 
Old 11-06-2012, 08:46 PM   #10
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Could be a file system problem. Can you fsck? The easiest way would be to create a /etc/forcefsck file and reboot. Alternatively boot Linux from media such as a Knoppix DVD. Or, for file systems other than root, go to single user mode.

Could be a disk bus controller or related hardware (inc. HDD-related cables) problem. Easiest way to test would be to replace the motherboard and cables with known good items if available.
 
Old 11-07-2012, 10:38 AM   #11
lrtward
Member
 
Registered: Feb 2011
Distribution: CentOS, Ubuntu
Posts: 97

Rep: Reputation: 9
Are you out of disk space?
Run 'df' and see what you get.
I've done that before, and my server acted in a similar fashion to what you're seeing.
 
Old 11-07-2012, 11:15 AM   #12
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Hi lrtward...
Thanks for your input.
I have plenty of disc space so that's not the problem.

catkin said:
Quote:
Could be a disk bus controller or related hardware (inc. HDD-related cables) problem. Easiest way to test would be to replace the motherboard and cables with known good items if available.
I've removed the hard drive and put it it to a known good computer
I struggled a bit to get the network working, but managed it eventually.
The problem still persists, so back to the drawing board.
Quote:
Could be a file system problem. Can you fsck? The easiest way would be to create a /etc/forcefsck file and reboot.
I followed your suggestion and set the system to check the file system at reboot. In fact it will check the file system at every boot.
Quote:
Alternatively boot Linux from media such as a Knoppix DVD. Or, for file systems other than root, go to single user mode.
I have downloaded knoppix 7 and created a bootable CD.
However, I don't know how to boot it to see my hard drive.
It gets to
boot:
and then continues to a menu.
Now I'm stuck.
Any advice ???

Many thanks for your advice...
 
Old 11-07-2012, 09:54 PM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by countrydj View Post
I followed your suggestion and set the system to check the file system at reboot. In fact it will check the file system at every boot.

I have downloaded knoppix 7 and created a bootable CD.
However, I don't know how to boot it to see my hard drive.
It gets to
boot:
and then continues to a menu.
Now I'm stuck.
Any advice ???
.
Interesting -- IIRC the distros I've used /etc/forcefsck with delete the file during boot.

Sorry -- cannot advise; I currently only have access to a netbook without CD/DVD drive so cannot test. IIRC Knoppix boots to a desktop with icons for partitions containing file systems on the desktop. What are the menu items?

EDIT: but how to use Knoppix is academic regards this thread if you have fscked the file system(s) already ... ?

Last edited by catkin; 11-07-2012 at 09:55 PM.
 
Old 11-08-2012, 02:24 AM   #14
countrydj
Member
 
Registered: Jun 2009
Location: Preston, England
Distribution: Centos 6
Posts: 127

Original Poster
Rep: Reputation: 1
Quote:
EDIT: but how to use Knoppix is academic regards this thread if you have fscked the file system(s) already ... ?
I thought that, but I thought that I would check it anyway.
Quote:
IIRC the distros I've used /etc/forcefsck with delete the file during boot.
OK. I have never used this before. I placed it in /etc/rc.local. I've now removed it.

I also ran: shutdown -rF now and watched the boot process.
Bootup 'flew' through.

I don't seem to be getting anywhere with this, so I will do a complete reinstall in a couple of days (when I have time)

Thanks for your help and advice
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] phpsite not showing images (buttons) home server for game server. jmdennis1987 Linux - Server 2 01-06-2011 04:00 PM
[SOLVED] corrupting file alphatest Linux - Software 1 12-14-2010 05:42 PM
DNS value corrupting melanieS Mandriva 0 10-09-2004 03:31 AM
Samba server failing to save/corrupting eafurie Linux - Networking 0 06-15-2004 02:51 PM
Windows corrupting Linux geyes30 Linux - General 2 03-24-2004 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration