Odd 404 error...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Odd 404 error...

Post by Todd_Z »

I track my 404's in an error log, and for some reason the Bg.jpg for my site comes up as a 404 often - any idea about why this is and how/if i can fix it? Maybe a php file that keeps trying to get the image if its locked somehow... I don't even have an idea...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If you look through your access logs, you should find what page/script is referencing it. It may be as simple as a case issue, or permissions problem..
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Thats the odd part - I log which pages are referencing the Bg.jpg, but when I go to those pages it works... its just randomly sometimes they fail...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

is this a dynamically created file, or a large file? What variant of JPEG is it?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Its as traditional as an image could possibly be ->

http://www.acdrifter.com/Bg.jpg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

why is your 4x4 image 12K ? btw, the block size in a JPEG is 8x8 for the cosine transform area.
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

a. idk why its 12k - is that a lot?
b. 8*8 why?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

That's the size the consortium chose for the cosine transform (CST) system. Once you get down into the nitty-gritty of the standards you'd understand.. I'll try to explain. The average picture doesn't change a whole lot over an 8x8 area. Therefore, if you are converting the bitmap data into a math equation describing the wavelength changes in the various directions possible through the block, it becomes a simpler equation. The more compression you ask for, the more basic the equation becomes too. This is why data is lost.

12K for a 4x4 image is huge. Fully uncompressed into memory, that image should only consume at most 64 bytes. That's with storing 32-bit values for each pixel and memory padding. Even a 8x8 fully uncompressed will consume 256 bytes with memory padding.
Post Reply